aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/eu/olli/cowlection/Cowlection.java
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2020-07-22 23:07:45 +0200
committerCow <cow@volloeko.de>2020-07-22 23:07:45 +0200
commit70dba3149a04105488c33fdc6ea99be93eb616aa (patch)
tree9ec94667a23e732b720e8510624bba89cc2b703c /src/main/java/eu/olli/cowlection/Cowlection.java
parentd73b34dba09385b216890191853157c0e57aacd1 (diff)
downloadCowlection-70dba3149a04105488c33fdc6ea99be93eb616aa.tar.gz
Cowlection-70dba3149a04105488c33fdc6ea99be93eb616aa.tar.bz2
Cowlection-70dba3149a04105488c33fdc6ea99be93eb616aa.zip
Added detection whether player is on SkyBlock or in other gamemodes
- Fixes e.g. removal of enchantments in non-SkyBlock gamemodes
Diffstat (limited to 'src/main/java/eu/olli/cowlection/Cowlection.java')
-rw-r--r--src/main/java/eu/olli/cowlection/Cowlection.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/eu/olli/cowlection/Cowlection.java b/src/main/java/eu/olli/cowlection/Cowlection.java
index ab538ee..9ce14c3 100644
--- a/src/main/java/eu/olli/cowlection/Cowlection.java
+++ b/src/main/java/eu/olli/cowlection/Cowlection.java
@@ -7,7 +7,6 @@ import eu.olli.cowlection.config.MooConfig;
import eu.olli.cowlection.handler.FriendsHandler;
import eu.olli.cowlection.handler.PlayerCache;
import eu.olli.cowlection.listener.ChatListener;
-import eu.olli.cowlection.listener.DungeonsListener;
import eu.olli.cowlection.listener.PlayerListener;
import eu.olli.cowlection.util.ChatHelper;
import eu.olli.cowlection.util.VersionChecker;
@@ -40,6 +39,7 @@ public class Cowlection {
private VersionChecker versionChecker;
private ChatHelper chatHelper;
private PlayerCache playerCache;
+ private boolean isOnSkyBlock;
private Logger logger;
@Mod.EventHandler
@@ -62,7 +62,6 @@ public class Cowlection {
@EventHandler
public void init(FMLInitializationEvent e) {
MinecraftForge.EVENT_BUS.register(new ChatListener(this));
- MinecraftForge.EVENT_BUS.register(new DungeonsListener(this));
MinecraftForge.EVENT_BUS.register(new PlayerListener(this));
ClientCommandHandler.instance.registerCommand(new MooCommand(this));
ClientCommandHandler.instance.registerCommand(new ShrugCommand(this));
@@ -109,6 +108,14 @@ public class Cowlection {
return logger;
}
+ public boolean isOnSkyBlock() {
+ return isOnSkyBlock;
+ }
+
+ public void setIsOnSkyBlock(boolean isOnSkyBlock) {
+ this.isOnSkyBlock = isOnSkyBlock;
+ }
+
/**
* Get mod's instance; instead of this method use dependency injection where possible
*/