mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
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:
parent
9e1aa5d34e
commit
7a724c2f13
@ -176,11 +176,10 @@ public class Command_saconfig extends FreedomCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find the old admin entry
|
// Find the old admin entry
|
||||||
String name = player.getName();
|
|
||||||
Admin admin = null;
|
Admin admin = null;
|
||||||
for (Admin loopAdmin : plugin.al.getAllAdmins())
|
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;
|
admin = loopAdmin;
|
||||||
break;
|
break;
|
||||||
@ -189,7 +188,6 @@ public class Command_saconfig extends FreedomCommand
|
|||||||
|
|
||||||
if (admin == null) // New admin
|
if (admin == null) // New admin
|
||||||
{
|
{
|
||||||
|
|
||||||
FUtil.adminAction(sender.getName(), "Adding " + player.getName() + " to the admin list", true);
|
FUtil.adminAction(sender.getName(), "Adding " + player.getName() + " to the admin list", true);
|
||||||
admin = new Admin(player);
|
admin = new Admin(player);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user