Use the display format defined by plugins

This commit is contained in:
Dinnerbone 2011-01-07 13:34:24 +00:00
parent e3e8e99fe7
commit 2e0413558f

View File

@ -432,7 +432,7 @@ implements ICommandListener {
// CraftBukkit start // CraftBukkit start
PlayerChatEvent event = new PlayerChatEvent(Type.PLAYER_CHAT, player, s); PlayerChatEvent event = new PlayerChatEvent(Type.PLAYER_CHAT, player, s);
server.getPluginManager().callEvent(event); server.getPluginManager().callEvent(event);
s = (new StringBuilder()).append("<").append(event.getPlayer().getDisplayName()).append("> ").append(event.getMessage()).toString(); s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage());
if (event.isCancelled()) return; if (event.isCancelled()) return;
// CraftBukkit stop // CraftBukkit stop