From 41fd0208fb012b886557c750034fd0dc604cb6b8 Mon Sep 17 00:00:00 2001 From: mdenials <46415607+mdenials@users.noreply.github.com> Date: Sun, 12 Nov 2023 09:12:43 +0500 Subject: [PATCH] Update MassTpaHack.java --- src/main/java/net/wurstclient/hacks/MassTpaHack.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/wurstclient/hacks/MassTpaHack.java b/src/main/java/net/wurstclient/hacks/MassTpaHack.java index 62f7cebff7..e1f4a5dcdd 100644 --- a/src/main/java/net/wurstclient/hacks/MassTpaHack.java +++ b/src/main/java/net/wurstclient/hacks/MassTpaHack.java @@ -80,14 +80,10 @@ public void onEnable() if (!commandSetup.getValue().contains("tp")) { - errorComment("Commands other than tp are not available."); + ChatUtils.error("Commands other than tp are not available."); + setEnabled(false); } } - - private void errorComment(String comment) { - ChatUtils.error(comment); - setEnabled(false); - } @Override public void onDisable() @@ -127,14 +123,14 @@ public void onReceivedMessage(ChatInputEvent event) if(message.contains("/help") || message.contains("permission")) { event.cancel(); - ChatUtils.message("This server doesn't have " + this.commandSetup.getValue() + "."); + ChatUtils.error("This server doesn't have " + this.commandSetup.getValue() + "."); setEnabled(false); }else if(message.contains("accepted") && message.contains("request") || message.contains("akzeptiert") && message.contains("anfrage")) { event.cancel(); - ChatUtils.message("Someone accepted your" + this.commandSetup.getValue() + "request. Stopping."); + ChatUtils.error("Someone accepted your" + this.commandSetup.getValue() + "request. Stopping."); setEnabled(false); } }