Merge pull request #274 from AtlasMediaGroup/main

Merge Main --> Development for 2022.06 Release.
This commit is contained in:
Ryan
2022-10-12 17:41:40 +01:00
committed by GitHub
12 changed files with 53 additions and 124 deletions

View File

@ -112,6 +112,9 @@ public class Command_coins extends FreedomCommand
+ ChatColor.GOLD + coinsToTransfer
+ ChatColor.GREEN + " coin" + (coinsToTransfer > 1 ? "s" : "")
+ " to " + ChatColor.GOLD + target.getName() + ChatColor.GREEN + ".", ChatColor.GREEN);
plugin.pl.save(playerData);
plugin.pl.save(senderData);
}
return true;

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