From d9280358ad4f0c6b772c25c6a43357cc18b9c65c Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 29 Jan 2011 20:38:41 -0800 Subject: [PATCH] Fixed for recent Bukkit update. --- src/com/sk89q/worldedit/bukkit/WorldEditPlugin.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/src/com/sk89q/worldedit/bukkit/WorldEditPlugin.java index 98ff2c9de..fce35669b 100644 --- a/src/com/sk89q/worldedit/bukkit/WorldEditPlugin.java +++ b/src/com/sk89q/worldedit/bukkit/WorldEditPlugin.java @@ -26,6 +26,7 @@ import java.io.InputStream; import java.util.logging.Logger; import org.bukkit.Server; import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.Event.Priority; import org.bukkit.event.Event; @@ -145,8 +146,15 @@ public class WorldEditPlugin extends JavaPlugin { config.load(); perms.load(); } - - public boolean onCommand(Player player, Command cmd, String commandLabel, String[] args) { + + public boolean onCommand(CommandSender sender, Command cmd, + String commandLabel, String[] args) { + if (!sender.isPlayer()) { + return true; + } + + Player player = (Player)sender; + if (cmd.getName().equalsIgnoreCase("reloadwe") && hasPermission(player, "worldedit.reload")) { try {