Interface ItemShopProduct

All Superinterfaces:
ShopProduct
All Known Subinterfaces:
BasicItemShopProduct, SpawnerItemShopProduct, SpecialItemShopProduct

public interface ItemShopProduct extends ShopProduct
Represents a type of product that drops items.
  • Method Details

    • getItemStacks

      @Deprecated ItemStack[] getItemStacks()
      Deprecated.
      Given items may depend on the player
      Returns the itemstacks that will be given to the player.
      Returns:
      The items that this product holds
      See Also:
    • getItemStacks

      ItemStack[] getItemStacks(@Nullable @Nullable Player player)
      Returns the itemstacks that will be given to the player.
      Parameters:
      player - The player who sees the items. May be null, which should be avoided
      Returns:
      The items that this product holds
    • setItemStack

      @Deprecated void setItemStack(ItemStack is)
      Deprecated.
      This interface no longer represents a basic item on its own
      Replace the product item.
      Parameters:
      is - The new product item
      Throws:
      UnsupportedOperationException - When executing this for a type other than ShopProductType.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:
      getGivingItems in interface ShopProduct
      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
      Returns:
      All items that will be given on a purchase