diff options
author | Animosity <nullcline@gmail.com> | 2011-01-05 10:47:57 +0800 |
---|---|---|
committer | Dinner Bone <dinnerbone@dinnerbone.com> | 2011-01-05 18:56:59 +0800 |
commit | 4792d55a08c9cb05a29a75219bdac996bdbee0e5 (patch) | |
tree | 8b677b3e4d272f7191d9f5c5af5e1cfb6e8cd141 /src/main/java/net/minecraft/server | |
parent | 8e66e52958886ce82b05603f984a452e7b1459d3 (diff) | |
download | craftbukkit-4792d55a08c9cb05a29a75219bdac996bdbee0e5.tar craftbukkit-4792d55a08c9cb05a29a75219bdac996bdbee0e5.tar.gz craftbukkit-4792d55a08c9cb05a29a75219bdac996bdbee0e5.tar.lz craftbukkit-4792d55a08c9cb05a29a75219bdac996bdbee0e5.tar.xz craftbukkit-4792d55a08c9cb05a29a75219bdac996bdbee0e5.zip |
Actually allow cancellation of player chat events
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/NetServerHandler.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 7cfe5ff5..2fd1c49f 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -419,6 +419,7 @@ implements ICommandListener { PlayerChatEvent event = new PlayerChatEvent(Type.PLAYER_CHAT, player, s); server.getPluginManager().callEvent(event); s = (new StringBuilder()).append("<").append(event.getPlayer().getName()).append("> ").append(event.getMessage()).toString(); + if (event.isCancelled()) return; // CraftBukkit stop a.info(s); |