mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-26 18:11:52 +01:00
Fix NPE in /kill when used from console. Thanks Necrodoom
This commit is contained in:
parent
92a2244650
commit
b8cdd7d1f7
@ -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()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user