Fix SAConfig NPE (originally by Allink)

This commit is contained in:
Video 2022-09-11 11:34:16 -06:00
parent 1ddeb4b621
commit 4564ad0449

View File

@ -242,7 +242,6 @@ public class Command_saconfig extends FreedomCommand
Player player = getPlayer(args[1]); Player player = getPlayer(args[1]);
Admin admin = player != null ? plugin.al.getAdmin(player) : plugin.al.getEntryByName(args[1]); Admin admin = player != null ? plugin.al.getAdmin(player) : plugin.al.getEntryByName(args[1]);
String adminName = admin.getName();
if (admin == null) if (admin == null)
{ {
@ -250,6 +249,8 @@ public class Command_saconfig extends FreedomCommand
return true; return true;
} }
String adminName = admin.getName();
FUtil.adminAction(sender.getName(), "Removing " + admin.getName() + " from the admin list", true); FUtil.adminAction(sender.getName(), "Removing " + admin.getName() + " from the admin list", true);
admin.setActive(false); admin.setActive(false);