Package nl.minetopiasdb.api
Class LootcrateManager
java.lang.Object
nl.minetopiasdb.api.LootcrateManager
Management class for lootcrates
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem
(LootcrateType type, org.bukkit.inventory.ItemStack item) Add an item to the specified lootcrate typestatic LootcrateManager
Get an instance of LootcrateManagerList<org.bukkit.inventory.ItemStack>
getItems
(LootcrateType type) List of items in this lootcrateList<org.bukkit.inventory.ItemStack>
getRandomItems
(LootcrateType type, int amount) Get the specified amount of random items from provided lootcrategetSize
(LootcrateType type) Get the amount of items in this lootcratevoid
removeItem
(LootcrateType type, int slot) Remove item from lootcrates at specified slotvoid
setItems
(LootcrateType type, org.bukkit.inventory.ItemStack[] items) Change the content of provided lootcrate
-
Constructor Details
-
LootcrateManager
public LootcrateManager()
-
-
Method Details
-
getInstance
Get an instance of LootcrateManager- Returns:
- instance of lootcrate manager
-
getRandomItems
Get the specified amount of random items from provided lootcrate- Parameters:
type
- lootcrate typeamount
- item amount- Returns:
- list of random itemstacks
-
setItems
Change the content of provided lootcrate- Parameters:
type
- lootcrate typeitems
- new content of lootcrate
-
addItem
Add an item to the specified lootcrate type- Parameters:
type
- lootcrate typeitem
- itemstack
-
removeItem
Remove item from lootcrates at specified slot- Parameters:
type
- lootcrate typeslot
- item slot
-
getSize
Get the amount of items in this lootcrate- Parameters:
type
- lootcrate type- Returns:
- amount of items in this lootcrate
-
getItems
List of items in this lootcrate- Parameters:
type
- lootcrate type- Returns:
- list of items
-