Stage 2 of IP -> UUID migration: changing the admin list to use UUIDs

This commit is contained in:
Video
2022-04-15 07:09:23 -06:00
parent 98388d0d23
commit 05745c4210
8 changed files with 49 additions and 116 deletions

View File

@ -205,15 +205,7 @@ public class Command_saconfig extends FreedomCommand
else // Existing admin
{
FUtil.adminAction(sender.getName(), "Re-adding " + player.getName() + " to the admin list", true);
String oldName = admin.getName();
if (!oldName.equals(player.getName()))
{
admin.setName(player.getName());
plugin.sql.updateAdminName(oldName, admin.getName());
}
admin.addIp(FUtil.getIp(player));
admin.setActive(true);
admin.setLastLogin(new Date());