diff options
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/handler')
-rw-r--r-- | src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java b/src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java index 3df9048..b687ef2 100644 --- a/src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java +++ b/src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java @@ -34,12 +34,24 @@ public class DungeonCache { return isInDungeon; } + public void onDungeonEnterOrLeave(boolean isInDungeonNow) { + boolean wasInDungeon = isInDungeon; + + if (!wasInDungeon && isInDungeonNow) { + onDungeonEntered(); + } else if (wasInDungeon && !isInDungeonNow) { + onDungeonLeft(); + } + } + public void onDungeonEntered() { + main.getLogger().info("Entered SkyBlock Dungeon!"); isInDungeon = true; resetCounters(); } public void onDungeonLeft() { + main.getLogger().info("Leaving SkyBlock Dungeon!"); isInDungeon = false; resetCounters(); } |