From b417a5cbe0e17d187a5a90fafab89fa163132595 Mon Sep 17 00:00:00 2001 From: Byron Marohn Date: Thu, 2 May 2024 19:38:51 -0700 Subject: [PATCH] Fixes Signed-off-by: Byron Marohn --- .../com/playmonumenta/libraryofsouls/LibraryOfSoulsAPI.java | 2 +- .../java/com/playmonumenta/libraryofsouls/SoulPartyEntry.java | 2 +- .../java/com/playmonumenta/libraryofsouls/SoulsDatabase.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/playmonumenta/libraryofsouls/LibraryOfSoulsAPI.java b/src/main/java/com/playmonumenta/libraryofsouls/LibraryOfSoulsAPI.java index 02b9851..1aa6462 100644 --- a/src/main/java/com/playmonumenta/libraryofsouls/LibraryOfSoulsAPI.java +++ b/src/main/java/com/playmonumenta/libraryofsouls/LibraryOfSoulsAPI.java @@ -58,7 +58,7 @@ public static Set getSoulLocations() { return db.listMobLocations(); } - public static List getDescription(String soulName) { + public static @Nullable List getDescription(String soulName) { SoulsDatabase db = SoulsDatabase.getInstance(); SoulEntry soul = db.getSoul(soulName); if (soul == null) { diff --git a/src/main/java/com/playmonumenta/libraryofsouls/SoulPartyEntry.java b/src/main/java/com/playmonumenta/libraryofsouls/SoulPartyEntry.java index 168b408..5355b5e 100644 --- a/src/main/java/com/playmonumenta/libraryofsouls/SoulPartyEntry.java +++ b/src/main/java/com/playmonumenta/libraryofsouls/SoulPartyEntry.java @@ -22,7 +22,7 @@ public class SoulPartyEntry implements SoulGroup { public SoulPartyEntry(List history) throws Exception { mHistory = history; - String refLabel = history.get(0 ).getLabel(); + String refLabel = history.get(0).getLabel(); for (SoulPartyHistoryEntry entry : history) { if (!entry.getLabel().equals(refLabel)) { diff --git a/src/main/java/com/playmonumenta/libraryofsouls/SoulsDatabase.java b/src/main/java/com/playmonumenta/libraryofsouls/SoulsDatabase.java index 5d43fcd..47b7a34 100644 --- a/src/main/java/com/playmonumenta/libraryofsouls/SoulsDatabase.java +++ b/src/main/java/com/playmonumenta/libraryofsouls/SoulsDatabase.java @@ -102,6 +102,8 @@ public SoulsDatabase(Plugin plugin, boolean loadHistory) throws Exception { mIgnoreNextChange = false; } } catch (Exception e) { + mPlugin.getLogger().warning("Caught exception while polling database file: " + e.getMessage()); + e.printStackTrace(); } }, 200, 200);