Interface ICategoryContent
public interface ICategoryContent
Represents a category content in a shop.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(org.bukkit.entity.Player player, IShopCache shopCache, int slot) Execute the category content action for the player.Get the path name of the category content.Get the list of content tiers for the category content.Get the identifier of the category content.org.bukkit.inventory.ItemStackgetItemStack(org.bukkit.entity.Player player) Get the preview item of the content in the player's language.org.bukkit.inventory.ItemStackgetItemStack(org.bukkit.entity.Player player, IShopCache shopCache) Get the ItemStack representation of the category content for the player, using the shop cache.intgetSlot()Get the slot of the content within its category.voidgiveItems(org.bukkit.entity.Player player, IShopCache shopCache, IArena arena) Give the items associated with the category content to the player.booleanhasQuick(org.bukkit.entity.Player player) Check if the content is available for quick buy for the player.booleanCheck if the content is downgradable.booleanCheck if the content is permanent.booleanCheck if the content is upgradeablevoidsetCategoryIdentifier(String categoryIdentifier) Set the path name of the category content.
-
Method Details
-
getSlot
int getSlot()Get the slot of the content within its category.- Returns:
- The slot number.
-
getItemStack
org.bukkit.inventory.ItemStack getItemStack(org.bukkit.entity.Player player) Get the preview item of the content in the player's language.- Parameters:
player- The player for whom the item is being retrieved.- Returns:
- The ItemStack representing the content's preview item.
-
hasQuick
boolean hasQuick(org.bukkit.entity.Player player) Check if the content is available for quick buy for the player.- Parameters:
player- The player to check for.- Returns:
trueif the player has the content available for quick buy,falseotherwise.
-
isPermanent
boolean isPermanent()Check if the content is permanent.- Returns:
trueif the content is permanent,falseotherwise.
-
isDowngradable
boolean isDowngradable()Check if the content is downgradable.- Returns:
trueif the content is downgradable,falseotherwise.
-
isUpgradable
boolean isUpgradable()Check if the content is upgradeable- Returns:
- if the code is upgradable (Has more than 1 tier)
-
getIdentifier
String getIdentifier()Get the identifier of the category content.- Returns:
- The identifier of the category content.
-
getCategoryIdentifier
String getCategoryIdentifier()Get the path name of the category content.- Returns:
- The path name of the category content.
-
setCategoryIdentifier
Set the path name of the category content.- Parameters:
categoryIdentifier- The path name to set.
-
getContentTiers
List<IContentTier> getContentTiers()Get the list of content tiers for the category content.- Returns:
- The list of content tiers.
-
execute
Execute the category content action for the player.- Parameters:
player- The player who is executing the action.shopCache- The shop cache containing the player's data.slot- The slot number of the content.
-
giveItems
Give the items associated with the category content to the player.- Parameters:
player- The player to give the items to.shopCache- The shop cache containing the player's data.arena- The arena context for the shop.
-
getItemStack
Get the ItemStack representation of the category content for the player, using the shop cache.- Parameters:
player- The player for whom the ItemStack is being retrieved.shopCache- The shop cache containing the player's data.- Returns:
- The ItemStack representing the category content.
-