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
commit1a292e34a26aed843eb33c8e36c594152bd226fb (patch)
tree3e086b45953a2fcbc38e0935631ff8d2175b39fb
parent1faf24b7404be4fe59e10ee9c21f885f1a44429b (diff)
downloadEssentials-1a292e34a26aed843eb33c8e36c594152bd226fb.tar
Essentials-1a292e34a26aed843eb33c8e36c594152bd226fb.tar.gz
Essentials-1a292e34a26aed843eb33c8e36c594152bd226fb.tar.lz
Essentials-1a292e34a26aed843eb33c8e36c594152bd226fb.tar.xz
Essentials-1a292e34a26aed843eb33c8e36c594152bd226fb.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()));
}