Interface ShopProduct
- All Known Subinterfaces:
- CommandShopProduct,- ItemShopProduct,- SpawnerItemShopProduct,- SpecialItemShopProduct
public interface ShopProduct
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the amount that will be given to the playerdefault StringReturns the name of this product in the default configured language.
 This method might return something like "Iron", "Bronze", "A command" or something else configured by the usergetDisplayName(@Nullable CommandSender sender) Returns the name of this product that can be presented to the given sender.
 This method might return something like "Iron", "Bronze", "A command" or something else configured by the usergetGivingItems(Player player, @Nullable Team team, @Nullable Arena arena, int multiplier) Gets the ItemStacks the player will actually receive.getId()Returns the unique id of this instance.getItem()Returns the item to which the product has been added togetType()Products may vary on what they effectively give to the player.
 This returns what exactly it'll be giving to the playervoidGives the product to a player.voidgive(Player player, @Nullable Team team, @Nullable Arena arena, int multiplier, @Nullable Integer targetInvSlot) Gives the product to a player.booleanReturns whether or not this item is automatically getting worn on purchasebooleanReturns if this item is able to obtain any damagebooleansetAmount(int amount) Set the amount that will be given to the player.
 Not any product type does support this operation, those who don't support it will return falsevoidsetAutoWear(boolean autowear) Set whether or not this item shall be automatically worn on purchasevoidsetUnbreakable(boolean unbreakable) Set whether or not this item shall be able to obtain damage
- 
Method Details- 
getItemShopItem getItem()Returns the item to which the product has been added to- Returns:
- The item to which the product was added to
 
- 
getTypeShopProductType getType()Products may vary on what they effectively give to the player.
 This returns what exactly it'll be giving to the player- Returns:
- The type of this product
 
- 
getIdUUID getId()Returns the unique id of this instance.Keep in mind that this will change whenever the plugin gets reloaded! - Returns:
- The unique id of this product
 
- 
getAmountint getAmount()Returns the amount that will be given to the player- Returns:
- The amount that will be given to the player
 
- 
setAmountboolean setAmount(int amount) Set the amount that will be given to the player.
 Not any product type does support this operation, those who don't support it will return false- Parameters:
- amount- The new amount
- Returns:
- If this operation is being supported by the type
 
- 
getDisplayNameReturns the name of this product that can be presented to the given sender.
 This method might return something like "Iron", "Bronze", "A command" or something else configured by the user- Parameters:
- sender- Uses his local info to return the name in the right language
- Returns:
- The display name of this product
 
- 
getDisplayNameReturns the name of this product in the default configured language.
 This method might return something like "Iron", "Bronze", "A command" or something else configured by the user- Returns:
- The display name of this product
 
- 
isAutoWearboolean isAutoWear()Returns whether or not this item is automatically getting worn on purchase- Returns:
- If this item is being auto worn
 
- 
setAutoWearvoid setAutoWear(boolean autowear) Set whether or not this item shall be automatically worn on purchase- Parameters:
- autowear- The new value
 
- 
isUnbreakableboolean isUnbreakable()Returns if this item is able to obtain any damage- Returns:
- If the item obtains any damage on use
 
- 
setUnbreakablevoid setUnbreakable(boolean unbreakable) Set whether or not this item shall be able to obtain damage- Parameters:
- unbreakable- The new value
 
- 
givevoid give(Player player, @Nullable @Nullable Team team, @Nullable @Nullable Arena arena, int multiplier) Gives the product to a player.The team and the arena parameters are optional. Some product features won't be applied if they're null. This includes: automatic dying and enchantments gained from upgrades- Parameters:
- player- The player to which the item shall be given to. Names will also be automatically translated into the language of this player
- team- The team in which the player is in. Can be- null
- arena- The arena in which the player is in. Can be- null
- multiplier- How many times this product shall be given to the player. Should be at least 1, or otherwise no effect will be seen
- See Also:
 
- 
givevoid give(Player player, @Nullable @Nullable Team team, @Nullable @Nullable Arena arena, int multiplier, @Nullable @Nullable Integer targetInvSlot) Gives the product to a player.The team and the arena parameters are optional. Some product features won't be applied if they're null. This includes: automatic dying and enchantments gained from upgrades- Parameters:
- player- The player to which the item shall be given to. Names will also be automatically translated into the language of this player
- team- The team in which the player is in. Can be- null
- arena- The arena in which the player is in. Can be- null
- multiplier- How many times this product shall be given to the player. Should be at least 1, or otherwise no effect will be seen
- targetInvSlot- The slot to which the item shall be (at least tried) added to. Can be- nullif that doesn't matter
 
- 
getGivingItemsItemStack[] getGivingItems(Player player, @Nullable @Nullable Team team, @Nullable @Nullable Arena arena, int multiplier) Gets the ItemStacks the player will actually receive.The team and the arena parameters are optional. Some product features won't be applied if they're null. This includes: automatic dying and enchantments gained from upgrades- Parameters:
- player- The player to which the item shall be given to. Names will also be automatically translated into the language of this player
- team- The team in which the player is in. Can be- null
- arena- The arena in which the player is in. Can be- null
- multiplier- How many times this product shall be given to the player. Should be at least 1, or otherwise we will return an empty array
 
 
-