Class ShopCustomizer
java.lang.Object
studio.magemonkey.genesis.managers.ShopCustomizer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.InventorycreateInventory(GenesisShop shop, Set<GenesisBuy> items, org.bukkit.entity.Player p, ClassManager m, int page, int highestPage, GenesisShopHolder oldShopHolder) Create a new inventoryorg.bukkit.inventory.InventorycreateInventory(GenesisShop shop, Set<GenesisBuy> items, org.bukkit.entity.Player p, ClassManager m, org.bukkit.inventory.Inventory inventory, int page, int highestPage) Create a new inventoryorg.bukkit.inventory.InventorycreateInventory(GenesisShop shop, Set<GenesisBuy> items, org.bukkit.entity.Player p, ClassManager m, org.bukkit.inventory.Inventory inventory, GenesisShopHolder holder, int page) Create a new inventoryintgetFirstFreeSlot(org.bukkit.inventory.Inventory inventory, Map<Integer, GenesisBuy> everything) Get the first free slot in an inventoryintgetSlot(org.bukkit.inventory.Inventory inventory, Map<Integer, GenesisBuy> everything, GenesisBuy buy) Get a slot positionbooleanshowItem(GenesisShop shop, GenesisShopHolder holder, GenesisBuy buy, org.bukkit.entity.Player p, org.bukkit.inventory.Inventory inventory, Map<Integer, GenesisBuy> filledLocs) Show the item in an inventory
-
Constructor Details
-
ShopCustomizer
public ShopCustomizer()
-
-
Method Details
-
createInventory
public org.bukkit.inventory.Inventory createInventory(GenesisShop shop, Set<GenesisBuy> items, org.bukkit.entity.Player p, ClassManager m, int page, int highestPage, GenesisShopHolder oldShopHolder) Create a new inventory- Parameters:
shop- the shop to create fromitems- the items in the shopp- the player opening the shopm- the class managerpage- the page of the shophighestPage- the highest page for the shopoldShopHolder- the holder of the shop- Returns:
- inventory
-
createInventory
public org.bukkit.inventory.Inventory createInventory(GenesisShop shop, Set<GenesisBuy> items, org.bukkit.entity.Player p, ClassManager m, org.bukkit.inventory.Inventory inventory, int page, int highestPage) Create a new inventory- Parameters:
shop- the shop to create fromitems- the items for the inventoryp- the player openingm- the class managerinventory- the inventory being openedpage- the page of the shophighestPage- the amount of pages for shop- Returns:
- inventory
-
createInventory
public org.bukkit.inventory.Inventory createInventory(GenesisShop shop, Set<GenesisBuy> items, org.bukkit.entity.Player p, ClassManager m, org.bukkit.inventory.Inventory inventory, GenesisShopHolder holder, int page) Create a new inventory- Parameters:
shop- the shop to open asitems- the items in the shopp- the player openingm- the class managerinventory- the inventory to open asholder- the holder of the inventorypage- the page of the inventory- Returns:
- inventory
-
showItem
public boolean showItem(GenesisShop shop, GenesisShopHolder holder, GenesisBuy buy, org.bukkit.entity.Player p, org.bukkit.inventory.Inventory inventory, Map<Integer, GenesisBuy> filledLocs) Show the item in an inventory- Parameters:
shop- the shop to get fromholder- the holder of the shopbuy- the shop itemp- the player opening the shopinventory- the inventory of the shopfilledLocs- the filled locations of the shop- Returns:
- show or not
-
getSlot
public int getSlot(org.bukkit.inventory.Inventory inventory, Map<Integer, GenesisBuy> everything, GenesisBuy buy) Get a slot position- Parameters:
inventory- the inventory of the shopeverything- all items loaded in the inventorybuy- the item being checked- Returns:
- slot of item
-
getFirstFreeSlot
public int getFirstFreeSlot(org.bukkit.inventory.Inventory inventory, Map<Integer, GenesisBuy> everything) Get the first free slot in an inventory- Parameters:
inventory- the inventory to checkeverything- the items loaded in the inventory- Returns:
- first free slot
-