From 0aaefc26a4e9bf670950e643f6acaf23d9e2bb89 Mon Sep 17 00:00:00 2001 From: Bella Date: Sat, 14 Mar 2020 14:26:01 -0400 Subject: [PATCH] command don't use method for 1liner --- src/main/java/me/zeroeightsix/kami/command/Command.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/zeroeightsix/kami/command/Command.java b/src/main/java/me/zeroeightsix/kami/command/Command.java index ef74a081..dedaca99 100644 --- a/src/main/java/me/zeroeightsix/kami/command/Command.java +++ b/src/main/java/me/zeroeightsix/kami/command/Command.java @@ -54,7 +54,7 @@ public abstract class Command { } public static void sendRawChatMessage(String message) { - if (isSendable()) { + if (Minecraft.getMinecraft().player != null) { Wrapper.getPlayer().sendMessage(new ChatMessage(message)); } else { LogWrapper.info(message); @@ -62,17 +62,13 @@ public abstract class Command { } public static void sendServerMessage(String message) { - if (isSendable()) { + if (Minecraft.getMinecraft().player != null) { Wrapper.getPlayer().connection.sendPacket(new CPacketChatMessage(message)); } else { LogWrapper.warning("Could not send server message: \"" + message + "\""); } } - public static boolean isSendable() { - return Minecraft.getMinecraft().player != null; - } - protected void setDescription(String description) { this.description = description; }