Interface ItemShopProduct

All Superinterfaces:
ShopProduct
All Known Subinterfaces:
SpawnerItemShopProduct, SpecialItemShopProduct

public interface ItemShopProduct extends ShopProduct
  • Method Details

    • getItemStacks

      ItemStack[] getItemStacks()
      Returns the itemstacks that will be given to the player.
      Returns:
      The items that this product holds
    • setItemStack

      void setItemStack(ItemStack is)
      Replace the product item.
      Parameters:
      is - The new product item
      Throws:
      UnsupportedOperationException - When executing this for a type other than ShopProductType.ITEM
    • 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