command don't use method for 1liner

This commit is contained in:
Bella 2020-03-14 14:26:01 -04:00
parent a8e22971cc
commit 0aaefc26a4
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
1 changed files with 2 additions and 6 deletions

View File

@ -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;
}