From 63796c836264d86dcf2b730e871b8d55ee88a723 Mon Sep 17 00:00:00 2001 From: Bella Date: Fri, 6 Dec 2019 11:09:36 -0500 Subject: [PATCH] add check for pearldupe --- .../kami/module/modules/sdashb/misc/PearlDupe.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/sdashb/misc/PearlDupe.java b/src/main/java/me/zeroeightsix/kami/module/modules/sdashb/misc/PearlDupe.java index 55e4f5c2..cdd74745 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/sdashb/misc/PearlDupe.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/sdashb/misc/PearlDupe.java @@ -19,12 +19,16 @@ public class PearlDupe extends Module { private Setting disable = register(Settings.b("Disable on death", true)); public void onEnable() { + if (Minecraft.getMinecraft().getCurrentServerData() == null) { + Command.sendWarningMessage("[PearlDupe] &l&Error: &r&6This doesn't work in singleplayer"); + this.disable(); + } if (info.getValue()) { - Command.sendChatMessage("Instructions: throw a pearl, it /kills on death "); - Command.sendChatMessage("This doesn't always work, and it doesn't work for 2b2t and 9b9t"); + Command.sendChatMessage("[PearlDupe] Instructions: throw a pearl, it /kills on death "); + Command.sendChatMessage("[PearlDupe] This doesn't always work, and it doesn't work for 2b2t and 9b9t"); } if (warn.getValue()) { - Command.sendWarningMessage("Warning is still on, please disable the option once you've read the instructions"); + Command.sendWarningMessage("[PearlDupe] Warning is still on, please disable the option once you've read the instructions"); this.disable(); } }