Interface SellRegion


public interface SellRegion
Represents a region where auto-selling blocks or items is allowed. Contains methods to manage sell prices and permissions within the region.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSellPrice(com.cryptomorin.xseries.XMaterial material, double price)
    Adds or updates the sell price for a specific material in this region.
    boolean
    canPlayerSellInRegion(org.bukkit.entity.Player player)
    Checks if the given player has permission to sell in this region.
    boolean
    contains(org.bukkit.Location location)
    Checks whether a given Location is inside this sell region.
    org.codemc.worldguardwrapper.region.IWrappedRegion
    Gets the WorldGuard region this SellRegion represents.
    Gets the permission node required for a player to sell items in this region.
    double
    getSellPriceForMaterial(com.cryptomorin.xseries.XMaterial material)
    Gets the sell price for a specific material in this region.
    org.bukkit.World
    Gets the World where this region is located.
    void
    removeSellPrice(com.cryptomorin.xseries.XMaterial material)
    Removes a material from being sellable in this region.
  • Method Details

    • getRegion

      org.codemc.worldguardwrapper.region.IWrappedRegion getRegion()
      Gets the WorldGuard region this SellRegion represents.
      Returns:
      the wrapped WorldGuard region
    • getWorld

      org.bukkit.World getWorld()
      Gets the World where this region is located.
      Returns:
      the world of the region
    • getRequiredPermission

      String getRequiredPermission()
      Gets the permission node required for a player to sell items in this region.
      Returns:
      the required permission string
    • addSellPrice

      void addSellPrice(com.cryptomorin.xseries.XMaterial material, double price)
      Adds or updates the sell price for a specific material in this region.
      Parameters:
      material - the material to set the sell price for
      price - the price at which the material will be sold
    • removeSellPrice

      void removeSellPrice(com.cryptomorin.xseries.XMaterial material)
      Removes a material from being sellable in this region.
      Parameters:
      material - the material to remove from the sell price list
    • getSellPriceForMaterial

      double getSellPriceForMaterial(com.cryptomorin.xseries.XMaterial material)
      Gets the sell price for a specific material in this region.
      Parameters:
      material - the material to get the price for
      Returns:
      the sell price of the material, or 0 if not sellable
    • contains

      boolean contains(org.bukkit.Location location)
      Checks whether a given Location is inside this sell region.
      Parameters:
      location - the location to check
      Returns:
      true if the location is inside the region, false otherwise
    • canPlayerSellInRegion

      boolean canPlayerSellInRegion(org.bukkit.entity.Player player)
      Checks if the given player has permission to sell in this region. This is based on getRequiredPermission().
      Parameters:
      player - the player to check
      Returns:
      true if the player can sell in the region, false otherwise