summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-08-18 21:04:19 +0100
committerKHobbits <rob@khobbits.co.uk>2013-08-18 21:04:19 +0100
commitb8cdd7d1f7955d188add26e42b91c8fb13e54665 (patch)
tree7b505f936b45b49eb28d5bdcbfcf4099e62fca74
parent92a2244650542b4ded18454192c6f0f4bc996395 (diff)
downloadEssentials-b8cdd7d1f7955d188add26e42b91c8fb13e54665.tar
Essentials-b8cdd7d1f7955d188add26e42b91c8fb13e54665.tar.gz
Essentials-b8cdd7d1f7955d188add26e42b91c8fb13e54665.tar.lz
Essentials-b8cdd7d1f7955d188add26e42b91c8fb13e54665.tar.xz
Essentials-b8cdd7d1f7955d188add26e42b91c8fb13e54665.zip
Fix NPE in /kill when used from console. Thanks Necrodoom
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkill.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
index 88086900a..5191d43ad 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkill.java
@@ -32,7 +32,7 @@ public class Commandkill extends EssentialsCommand
final List<Player> matchedPlayers = server.matchPlayer(args[0]);
for (Player matchPlayer : matchedPlayers)
{
- if (ess.getUser(matchPlayer).isAuthorized("essentials.kill.exempt") && !ess.getUser(sender).isAuthorized("essentials.kill.force"))
+ if (sender instanceof Player && ess.getUser(matchPlayer).isAuthorized("essentials.kill.exempt") && !ess.getUser(sender).isAuthorized("essentials.kill.force"))
{
throw new Exception(_("killExempt", matchPlayer.getDisplayName()));
}