Class LootcrateManager

java.lang.Object
nl.minetopiasdb.api.LootcrateManager

public class LootcrateManager extends Object
Management class for lootcrates
  • Constructor Details

    • LootcrateManager

      public LootcrateManager()
  • Method Details

    • getInstance

      public static LootcrateManager getInstance()
      Get an instance of LootcrateManager
      Returns:
      instance of lootcrate manager
    • getRandomItems

      public List<org.bukkit.inventory.ItemStack> getRandomItems(LootcrateType type, int amount)
      Get the specified amount of random items from provided lootcrate
      Parameters:
      type - lootcrate type
      amount - item amount
      Returns:
      list of random itemstacks
    • setItems

      public void setItems(LootcrateType type, org.bukkit.inventory.ItemStack[] items)
      Change the content of provided lootcrate
      Parameters:
      type - lootcrate type
      items - new content of lootcrate
    • addItem

      public void addItem(LootcrateType type, org.bukkit.inventory.ItemStack item)
      Add an item to the specified lootcrate type
      Parameters:
      type - lootcrate type
      item - itemstack
    • removeItem

      public void removeItem(LootcrateType type, int slot)
      Remove item from lootcrates at specified slot
      Parameters:
      type - lootcrate type
      slot - item slot
    • getSize

      public Integer getSize(LootcrateType type)
      Get the amount of items in this lootcrate
      Parameters:
      type - lootcrate type
      Returns:
      amount of items in this lootcrate
    • getItems

      public List<org.bukkit.inventory.ItemStack> getItems(LootcrateType type)
      List of items in this lootcrate
      Parameters:
      type - lootcrate type
      Returns:
      list of items