Package com.tomkeuper.bedwars.api.shop
Interface IShopIndex
public interface IShopIndex
Represents a shop index.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSeparator
(org.bukkit.entity.Player player, org.bukkit.inventory.Inventory inv) Add a separator between categories and items in the shop index.void
Add a shop category to the index.Get the list of shop categories in the index.int
Get the size of the shop inventory.Get the message path for the shop inventory name.Get the quick buy button for the shop index.org.bukkit.inventory.ItemStack
getSelectedItem
(org.bukkit.entity.Player player) Get the item stack representing the selected category indicator.void
open
(org.bukkit.entity.Player player, IPlayerQuickBuyCache quickBuyCache, boolean callEvent) Open this shop to a player
-
Method Details
-
getNamePath
String getNamePath()Get the message path for the shop inventory name.- Returns:
- The message path.
-
getInvSize
int getInvSize()Get the size of the shop inventory.- Returns:
- The inventory size.
-
open
Open this shop to a player- Parameters:
player
- target playerquickBuyCache
- the player cache regarding his preferencescallEvent
- true if you want to call the shop open event
-
getCategoryList
List<IShopCategory> getCategoryList()Get the list of shop categories in the index.- Returns:
- The list of shop categories.
-
getQuickBuyButton
IQuickBuyButton getQuickBuyButton()Get the quick buy button for the shop index.- Returns:
- The quick buy button.
-
addSeparator
void addSeparator(org.bukkit.entity.Player player, org.bukkit.inventory.Inventory inv) Add a separator between categories and items in the shop index.- Parameters:
player
- The player.inv
- The shop inventory.
-
getSelectedItem
org.bukkit.inventory.ItemStack getSelectedItem(org.bukkit.entity.Player player) Get the item stack representing the selected category indicator.- Parameters:
player
- The player.- Returns:
- The item stack representing the selected category.
-
addShopCategory
Add a shop category to the index.- Parameters:
sc
- The shop category to add.
-