public class LootTable extends Object
Constructor and Description |
---|
LootTable(String json)
Instantiates a LootTable from a JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
fillInventory(org.bukkit.inventory.Inventory i,
Random r)
Fills an Inventory with loot.
|
List<org.bukkit.inventory.ItemStack> |
getLoot(Random r)
Fetches a list of ItemStacks from the loot table using the given Random instance.
|
public LootTable(String json) throws org.json.simple.parser.ParseException
json
- The JSON String representing the loot table.org.json.simple.parser.ParseException
- if malformed JSON is passed.public List<org.bukkit.inventory.ItemStack> getLoot(Random r)
r
- The Random instance to use.public void fillInventory(org.bukkit.inventory.Inventory i, Random r)
i
- The Inventory to fill.r
- The The Random instance to use.Copyright © 2020. All rights reserved.