Archiviert
13
0

Lowered the priority of the old command handler event. A number of plugins were using this event incorrectly. A new event, the command preprocesser event, has replaced the previous function of the original command event.

Dieser Commit ist enthalten in:
sk89q 2011-02-19 01:40:32 -08:00
Ursprung acd0344452
Commit d4b67c5549

Datei anzeigen

@ -622,7 +622,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
// CraftBukkit start
CraftPlayer player = getPlayer();
PlayerChatEvent event = new PlayerChatEvent(Type.PLAYER_COMMAND, player, s);
PlayerChatEvent event = new PlayerChatEvent(Type.PLAYER_COMMAND_PREPROCESS, player, s);
server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
@ -641,6 +641,14 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
if (targetPluginFound) {
return;
}
// Legacy command handler
event = new PlayerChatEvent(Type.PLAYER_COMMAND, player, s);
server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
return;
}
s = event.getMessage();
player = (CraftPlayer) event.getPlayer();
EntityPlayer e = player.getHandle();