From 9f25c1906d842adaf5b985c18e57d785cfb70ca3 Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 21 Jan 2011 18:01:42 -0800 Subject: [PATCH] Change /reload WorldEdit to /reloadwe. --- .../bukkit/WorldEditPlayerListener.java | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/com/sk89q/worldedit/bukkit/WorldEditPlayerListener.java b/src/com/sk89q/worldedit/bukkit/WorldEditPlayerListener.java index 8b064f895..793a5b62c 100644 --- a/src/com/sk89q/worldedit/bukkit/WorldEditPlayerListener.java +++ b/src/com/sk89q/worldedit/bukkit/WorldEditPlayerListener.java @@ -60,21 +60,18 @@ public class WorldEditPlayerListener extends PlayerListener { public void onPlayerCommand(PlayerChatEvent event) { String[] split = event.getMessage().split(" "); - if (split[0].equalsIgnoreCase("/reload") - && plugin.hasPermission(event.getPlayer(), "/reload") - && split.length > 1) { - if (split[1].equalsIgnoreCase("WorldEdit")) { - try { - plugin.loadConfiguration(); - event.getPlayer().sendMessage("WorldEdit configuration reloaded."); - } catch (Throwable t) { - event.getPlayer().sendMessage("Error while reloading: " - + t.getMessage()); - } - - event.setCancelled(true); - return; + if (split[0].equalsIgnoreCase("/reloadwe") + && plugin.hasPermission(event.getPlayer(), "/reloadwe")) { + try { + plugin.loadConfiguration(); + event.getPlayer().sendMessage("WorldEdit configuration reloaded."); + } catch (Throwable t) { + event.getPlayer().sendMessage("Error while reloading: " + + t.getMessage()); } + + event.setCancelled(true); + return; } if (plugin.controller.handleCommand(wrapPlayer(event.getPlayer()), split)) {