Skip to content

Commit

Permalink
crashes on 1.12, probably needs nms
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Nov 8, 2023
1 parent 94c1f5a commit b240753
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.moomoo.anarchyexploitfixes.modules.protocollib.windowclick;

import io.papermc.lib.PaperLib;
import me.moomoo.anarchyexploitfixes.AnarchyExploitFixes;
import me.moomoo.anarchyexploitfixes.config.Config;
import me.moomoo.anarchyexploitfixes.modules.AnarchyExploitFixesModule;
Expand Down Expand Up @@ -31,7 +32,7 @@ public void enable() {
@Override
public boolean shouldEnable() {
Config config = AnarchyExploitFixes.getConfiguration();
if (config.getBoolean("patches.window-click-crash-patch.enable", true)) {
if (config.getBoolean("patches.window-click-crash-patch.enable", true, "")) {
if (config.protocolLib_IsDisabled) {
LogUtils.moduleLog(Level.WARNING, name(), "Not patching exploit because you disabled ProtocolLib in config!");
return false;
Expand All @@ -40,7 +41,7 @@ public boolean shouldEnable() {
LogUtils.moduleLog(Level.SEVERE, name(), "Unable to patch exploit because ProtocolLib is not installed!");
return false;
}
return true;
return PaperLib.getMinecraftVersion() > 12;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.moomoo.anarchyexploitfixes.modules.protocollib.windowclick;

import io.papermc.lib.PaperLib;
import me.moomoo.anarchyexploitfixes.AnarchyExploitFixes;
import me.moomoo.anarchyexploitfixes.config.Config;
import me.moomoo.anarchyexploitfixes.modules.AnarchyExploitFixesModule;
Expand Down Expand Up @@ -41,7 +42,7 @@ public boolean shouldEnable() {
LogUtils.moduleLog(Level.SEVERE, name(), "Unable to patch exploit because ProtocolLib is not installed!");
return false;
}
return true;
return PaperLib.getMinecraftVersion() > 12;
}
return false;
}
Expand Down

0 comments on commit b240753

Please sign in to comment.