Adds info messages to replace NPE's created by being unable to load any local loot tracker records
Signed-off-by: PKLite <stonewall@pklite.xyz>
This commit is contained in:
@@ -330,15 +330,17 @@ public class LootTrackerPlugin extends Plugin
|
|||||||
lootRecords.addAll(RuneLiteAPI.GSON.fromJson(new FileReader(LOOT_RECORDS_FILE),
|
lootRecords.addAll(RuneLiteAPI.GSON.fromJson(new FileReader(LOOT_RECORDS_FILE),
|
||||||
new TypeToken<ArrayList<LootRecord>>()
|
new TypeToken<ArrayList<LootRecord>>()
|
||||||
{ }.getType()));
|
{ }.getType()));
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException | NullPointerException e)
|
||||||
{
|
{
|
||||||
e.printStackTrace();
|
log.info("Couldn't load any locally stored loots.");
|
||||||
|
}
|
||||||
|
if (lootRecords.size() > 0)
|
||||||
|
{
|
||||||
|
log.info("Loaded {} locally stored loot records", lootRecords.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Collection<LootRecord> finalLootRecords = lootRecords;
|
Collection<LootRecord> finalLootRecords = lootRecords;
|
||||||
clientThread.invokeLater(() ->
|
clientThread.invokeLater(() ->
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user