Skip to content

Commit

Permalink
Removing the pipe command split from the code entirely.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonBlade committed Apr 14, 2012
1 parent d86b839 commit 4d17a41
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,7 @@ public void onPlayerJoin(PlayerJoinEvent event) {
}
}
}

@EventHandler
public void onPlayerPreprocessCommand(PlayerCommandPreprocessEvent event) {
if (event.getMessage().contains("|")) {
String[] commands = event.getMessage().split("\\|");

for (String command : commands) {
command = command.trim();
if (command.charAt(0) == '/') {
event.getPlayer().chat(command);
}
}

event.setCancelled(true);
}
}


public static boolean onCommand(Player player, String[] split, String command) {
if (command.equalsIgnoreCase("vchunk")) {
player.getWorld().refreshChunk(player.getLocation().getBlockX(), player.getLocation().getBlockZ());
Expand Down

0 comments on commit 4d17a41

Please sign in to comment.