mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Unvanish, remove commandspy & set fuckoff radius to 0 for removed admins
This commit is contained in:
parent
78654eb5e8
commit
0326171e85
@ -6,6 +6,7 @@ import java.util.Collections;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||||
|
import me.totalfreedom.totalfreedommod.admin.AdminList;
|
||||||
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
||||||
import me.totalfreedom.totalfreedommod.discord.Discord;
|
import me.totalfreedom.totalfreedommod.discord.Discord;
|
||||||
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
import me.totalfreedom.totalfreedommod.player.FPlayer;
|
||||||
@ -240,7 +241,9 @@ public class Command_saconfig extends FreedomCommand
|
|||||||
checkRank(Rank.ADMIN);
|
checkRank(Rank.ADMIN);
|
||||||
|
|
||||||
Player player = getPlayer(args[1]);
|
Player player = getPlayer(args[1]);
|
||||||
|
FPlayer freedomPlayer = plugin.pl.getPlayer(player);
|
||||||
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)
|
||||||
{
|
{
|
||||||
@ -255,13 +258,27 @@ public class Command_saconfig extends FreedomCommand
|
|||||||
plugin.al.updateTables();
|
plugin.al.updateTables();
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
{
|
||||||
|
// Update tab name
|
||||||
plugin.rm.updateDisplay(player);
|
plugin.rm.updateDisplay(player);
|
||||||
plugin.pl.getPlayer(player).setAdminChat(false);
|
|
||||||
|
// Ensure admins don't have admin functionality when removed (FS-222)
|
||||||
|
freedomPlayer.setAdminChat(false);
|
||||||
|
freedomPlayer.setCommandSpy(false);
|
||||||
|
freedomPlayer.setFuckoffRadius(0);
|
||||||
|
|
||||||
|
// Disable vanish
|
||||||
|
plugin.esb.setVanished(adminName, false);
|
||||||
|
AdminList.vanished.remove(adminName);
|
||||||
|
|
||||||
|
for (Player player1 : server.getOnlinePlayers())
|
||||||
|
{
|
||||||
|
player1.showPlayer(plugin, player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.dc.enabled && ConfigEntry.DISCORD_ROLE_SYNC.getBoolean())
|
if (plugin.dc.enabled && ConfigEntry.DISCORD_ROLE_SYNC.getBoolean())
|
||||||
{
|
{
|
||||||
Discord.syncRoles(admin, plugin.pl.getData(admin.getName()).getDiscordID());
|
Discord.syncRoles(admin, plugin.pl.getData(adminName).getDiscordID());
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.ptero.updateAccountStatus(admin);
|
plugin.ptero.updateAccountStatus(admin);
|
||||||
|
Loading…
Reference in New Issue
Block a user