public class ShopMenu extends java.lang.Object implements WauzInventory
WauzShop
,
WauzShopActions
Modifier and Type | Field and Description |
---|---|
private static java.util.List<java.lang.Integer> |
offerSlots
Item slots for the buyable items in the shop menu.
|
private WauzShop |
shop
The shop displayed in the menu.
|
private WauzShopDiscount |
shopDiscount
The discount of the shop.
|
Modifier | Constructor and Description |
---|---|
private |
ShopMenu(WauzShop shop,
WauzShopDiscount shopDiscount)
Creates a new shop menu instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getInventoryId() |
static void |
open(org.bukkit.entity.Player player,
java.lang.String shopName,
java.lang.String citizenName)
Opens the menu for the given player.
|
void |
selectMenuPoint(org.bukkit.event.inventory.InventoryClickEvent event)
Checks if an event in this inventory was triggered by a player click.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroyInventory, getGamemodes, openInstance
private static java.util.List<java.lang.Integer> offerSlots
private WauzShop shop
private WauzShopDiscount shopDiscount
private ShopMenu(WauzShop shop, WauzShopDiscount shopDiscount)
shop
- The shop displayed in the menu.shopDiscount
- The discount of the shop.public java.lang.String getInventoryId()
getInventoryId
in interface WauzInventory
public static void open(org.bukkit.entity.Player player, java.lang.String shopName, java.lang.String citizenName)
player
- The player that should view the inventory.shopName
- The name of the shop to load.citizenName
- The name of the citizen who owns the shop.WauzShop.getShop(String)
,
WauzShop.getShopItems()
,
WauzShopItem.getInstance(Player, WauzShopDiscount, boolean)
,
MenuUtils.setBorders(Inventory)
public void selectMenuPoint(org.bukkit.event.inventory.InventoryClickEvent event)
selectMenuPoint
in interface WauzInventory
event
- The inventory click event.WauzShopActions.buy(Player, WauzShopItem, WauzShopDiscount)
,
WauzShopActions.sell(Player, ItemStack, boolean)
,
WauzShopActions.repair(Player, ItemStack, boolean)