summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandunban.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandunban.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
index 49ddd0b97..eeb60985d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java
@@ -1,13 +1,12 @@
package com.earth2me.essentials.commands;
+import com.earth2me.essentials.CommandSource;
import com.earth2me.essentials.Console;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.logging.Level;
import org.bukkit.OfflinePlayer;
import org.bukkit.Server;
-import org.bukkit.command.CommandSender;
-import org.bukkit.entity.Player;
public class Commandunban extends EssentialsCommand
@@ -18,7 +17,7 @@ public class Commandunban extends EssentialsCommand
}
@Override
- public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
+ public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
@@ -43,7 +42,7 @@ public class Commandunban extends EssentialsCommand
player.setBanned(false);
}
- final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
+ final String senderName = sender.isPlayer() ? sender.getPlayer().getDisplayName() : Console.NAME;
server.getLogger().log(Level.INFO, _("playerUnbanned", senderName, name));
ess.broadcastMessage("essentials.ban.notify", _("playerUnbanned", senderName, name));