mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 19:44:15 +02:00
Fix NPE in /kill when used from console. Thanks Necrodoom
This commit is contained in:
@@ -32,7 +32,7 @@ public class Commandkill extends EssentialsCommand
|
|||||||
final List<Player> matchedPlayers = server.matchPlayer(args[0]);
|
final List<Player> matchedPlayers = server.matchPlayer(args[0]);
|
||||||
for (Player matchPlayer : matchedPlayers)
|
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()));
|
throw new Exception(_("killExempt", matchPlayer.getDisplayName()));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user