diff options
author | Wesley Wolfe <wesley.d.wolfe+git@gmail.com> | 2014-05-13 20:13:16 -0500 |
---|---|---|
committer | Wesley Wolfe <wesley.d.wolfe+git@gmail.com> | 2014-05-13 20:13:16 -0500 |
commit | 730a62c96af811b035517d1891acd0265ffb8656 (patch) | |
tree | 2847a984353101dbf94da5ef912fee04f72b3075 /src/main/java/net/minecraft/server | |
parent | 65a6e9778506e02510424d60db31b50ce0430868 (diff) | |
download | craftbukkit-730a62c96af811b035517d1891acd0265ffb8656.tar craftbukkit-730a62c96af811b035517d1891acd0265ffb8656.tar.gz craftbukkit-730a62c96af811b035517d1891acd0265ffb8656.tar.lz craftbukkit-730a62c96af811b035517d1891acd0265ffb8656.tar.xz craftbukkit-730a62c96af811b035517d1891acd0265ffb8656.zip |
Handle chat packets correctly
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerConnection.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index 75a5cbe2..17978101 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -810,8 +810,8 @@ public class PlayerConnection implements PacketPlayInListener { } } - if (s.startsWith("/")) { - // CraftBukkit start + // CraftBukkit start + if (!packetplayinchat.a()) { try { this.minecraftServer.server.playerCommandState = true; this.handleCommand(s); @@ -828,7 +828,7 @@ public class PlayerConnection implements PacketPlayInListener { chatmessage.getChatModifier().setColor(EnumChatFormat.RED); this.sendPacket(new PacketPlayOutChat(chatmessage)); } else if (true) { - this.chat(s, packetplayinchat.a()); + this.chat(s, true); // CraftBukkit end - the below is for reference. :) } else { ChatMessage chatmessage1 = new ChatMessage("chat.type.text", new Object[] { this.player.getScoreboardDisplayName(), s}); @@ -871,7 +871,7 @@ public class PlayerConnection implements PacketPlayInListener { return; } - if (s.startsWith("/")) { + if (!async && s.startsWith("/")) { this.handleCommand(s); } else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) { // Do nothing, this is coming from a plugin |