From 4792d55a08c9cb05a29a75219bdac996bdbee0e5 Mon Sep 17 00:00:00 2001 From: Animosity Date: Wed, 5 Jan 2011 10:47:57 +0800 Subject: [PATCH] Actually allow cancellation of player chat events --- src/main/java/net/minecraft/server/NetServerHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 7cfe5ff5f8..2fd1c49f78 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);