aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/handler
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2020-08-02 23:40:24 +0200
committerCow <cow@volloeko.de>2020-08-02 23:40:24 +0200
commitf8c8c5a4c16338349a5a9e38608cdfcd603d339b (patch)
treefa81dfbb2306c13ba896bc6888a1ddbf7899a1ed /src/main/java/de/cowtipper/cowlection/handler
parentcc7c9f5b88cd7cf2dc64cb46c1b417ae7e82e6b4 (diff)
downloadCowlection-f8c8c5a4c16338349a5a9e38608cdfcd603d339b.tar.gz
Cowlection-f8c8c5a4c16338349a5a9e38608cdfcd603d339b.tar.bz2
Cowlection-f8c8c5a4c16338349a5a9e38608cdfcd603d339b.zip
Added more ways to detect if a player is in a SkyBlock dungeon
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/handler')
-rw-r--r--src/main/java/de/cowtipper/cowlection/handler/DungeonCache.java12
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();
}