Fixes bug that prevented /saconfig add from working properly

This popped up during testing right before RC2 was intended to be cut.
This commit is contained in:
Video 2022-09-11 12:12:36 -06:00
parent 9e1aa5d34e
commit 7a724c2f13

View File

@ -176,11 +176,10 @@ public class Command_saconfig extends FreedomCommand
}
// Find the old admin entry
String name = player.getName();
Admin admin = null;
for (Admin loopAdmin : plugin.al.getAllAdmins())
{
if (loopAdmin.getName().equalsIgnoreCase(name) || loopAdmin.getIps().contains(FUtil.getIp(player)))
if (loopAdmin.getUuid().equals(player.getUniqueId()))
{
admin = loopAdmin;
break;
@ -189,7 +188,6 @@ public class Command_saconfig extends FreedomCommand
if (admin == null) // New admin
{
FUtil.adminAction(sender.getName(), "Adding " + player.getName() + " to the admin list", true);
admin = new Admin(player);