Interface ItemShopProduct
- All Superinterfaces:
ShopProduct
- All Known Subinterfaces:
BasicItemShopProduct, SpawnerItemShopProduct, SpecialItemShopProduct
Represents a type of product that drops items.
-
Method Summary
Modifier and TypeMethodDescriptiongetGivingItems(Player player, @Nullable Team team, @Nullable Arena arena, int multiplier) Returns an array of all the items that are being given on a purchase.Deprecated.Given items may depend on the playergetItemStacks(@Nullable Player player) Returns the itemstacks that will be given to the player.voidDeprecated.This interface no longer represents a basic item on its ownMethods inherited from interface ShopProduct
getAmount, getDisplayName, getDisplayName, getId, getItem, getType, give, give, isAutoWear, isUnbreakable, setAmount, setAutoWear, setUnbreakable
-
Method Details
-
getItemStacks
Deprecated.Given items may depend on the playerReturns the itemstacks that will be given to the player.- Returns:
- The items that this product holds
- See Also:
-
getItemStacks
-
setItemStack
Deprecated.This interface no longer represents a basic item on its ownReplace the product item.- Parameters:
is- The new product item- Throws:
UnsupportedOperationException- When executing this for a type other thanShopProductType.ITEM- See Also:
-
getGivingItems
ItemStack[] getGivingItems(Player player, @Nullable @Nullable Team team, @Nullable @Nullable Arena arena, int multiplier) Returns an array of all the items that are being given on a purchase. Keep in mind that not all types of products give items. An empty array will be returned in that case.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- Specified by:
getGivingItemsin interfaceShopProduct- Parameters:
player- The player to which the item shall be given to. Names will also be automatically translated into the language of this playerteam- The team in which the player is in. Can benullarena- The arena in which the player is in. Can benullmultiplier- How many times this product shall be given to the player. Should be at least 1, or otherwise no effect will be seen- Returns:
- All items that will be given on a purchase
-