Package pl.szczurowsky.loottableparser
Class ParsedLootTable
java.lang.Object
pl.szczurowsky.loottableparser.ParsedLootTable
Parsed, convenient loot table object with methods to get loot.
-
Constructor Summary
ConstructorDescriptionParsedLootTable
(File file) Get loot table from json file.ParsedLootTable
(String jsonString) Get loot table from json string.ParsedLootTable
(URL siteURL) Get loot table from json url. -
Method Summary
-
Constructor Details
-
ParsedLootTable
Get loot table from json string.- Parameters:
jsonString
- json string
-
ParsedLootTable
Get loot table from json file.- Parameters:
file
- json file
-
ParsedLootTable
Get loot table from json url.- Parameters:
siteURL
- json url
-
-
Method Details
-
parse
Parse loot table.- Throws:
NotALootTableException
- if json is not a loot table
-
getLootTableObject
Get loot table object.- Returns:
- loot table object
-
getLoot
Get loot in list of ItemStacks.- Parameters:
bonus
- if true, bonus loot will be returned- Returns:
- list of ItemStacks
-