Fixed for recent Bukkit update.

This commit is contained in:
sk89q 2011-01-29 20:38:41 -08:00
parent b0069f2548
commit d9280358ad

View File

@ -26,6 +26,7 @@
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 void loadConfiguration() {
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 {