use UUIDs for developers

This commit is contained in:
speedxx 2020-08-19 21:19:15 -04:00
parent 04fee7d5c1
commit 72322f2e56
3 changed files with 24 additions and 10 deletions

View File

@ -14,10 +14,11 @@ public class Command_reactionbar extends FreedomCommand
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
if (!FUtil.isDeveloper(sender.getName()))
if (!FUtil.isDeveloper(playerSender))
{
return noPerms();
}
plugin.sh.forceStartReaction();
msg("Started a reaction.");
return true;

View File

@ -52,7 +52,7 @@ public class RankManager extends FreedomService
}
// Developers always show up
if (FUtil.isDeveloper(player.getName()))
if (FUtil.isDeveloper(player))
{
return Title.DEVELOPER;
}
@ -96,7 +96,7 @@ public class RankManager extends FreedomService
}
// Developers always show up
if (FUtil.isDeveloper(staffMember.getName()))
if (FUtil.isDeveloper((Player)staffMember))
{
return Title.DEVELOPER;
}
@ -180,7 +180,7 @@ public class RankManager extends FreedomService
FPlayer fPlayer = plugin.pl.getPlayer(player);
PlayerData data = plugin.pl.getData(player);
Displayable display = getDisplay(player);
if (plugin.sl.isStaff(player) || data.isMasterBuilder() || data.isDonator() || FUtil.isDeveloper(player.getName()))
if (plugin.sl.isStaff(player) || data.isMasterBuilder() || data.isDonator() || FUtil.isDeveloper(player))
{
String displayName = display.getColor() + player.getName();
player.setPlayerListName(displayName);
@ -249,7 +249,7 @@ public class RankManager extends FreedomService
}
// Broadcast login message
if (isStaff || FUtil.isDeveloper(player.getName()) || plugin.pl.getData(player).isMasterBuilder() || plugin.pl.getData(player).isDonator())
if (isStaff || FUtil.isDeveloper(player) || plugin.pl.getData(player).isMasterBuilder() || plugin.pl.getData(player).isDonator())
{
if (!plugin.sl.isVanished(player.getName()))
{

View File

@ -54,8 +54,21 @@ public class FUtil
private static final Random RANDOM = new Random();
public static final String SAVED_FLAGS_FILENAME = "savedflags.dat";
// See https://github.com/TotalFreedom/License - None of the listed names may be removed.
/* See https://github.com/TotalFreedom/License - None of the listed names may be removed.
Leaving this list here for anyone running TFM on a cracked server:
public static final List<String> DEVELOPERS = Arrays.asList("Madgeek1450", "Prozza", "WickedGamingUK", "Wild1145", "aggelosQQ", "scripthead", "supernt", "Telesphoreo", "CoolJWB");
*/
public static final List<String> DEVELOPERS = Arrays.asList(
"1156a81a-23fb-435e-9aff-fe9c2ea7e82d", // Madgeek1450
"f9a1982e-252e-4ed3-92ed-52b0506a39c9", // Prozza
"90eb5d86-ed60-4165-a36e-bb77aa3c6664", // WickedGamingUK
"604cbb51-842d-4b43-8b0a-d1d7c6cd2869", // Wild1145
"e67d77c4-fff9-4cea-94cc-9f1f1ab7806b", // aggelosQQ
"0061326b-8b3d-44c8-830a-5f2d59f5dc1b", // scripthead
"53b1512e-3481-4702-9f4f-63cb9c8be6a1", // supernt
"78408086-1991-4c33-a571-d8fa325465b2", // Telesphoreo
"67ce0e28-3d6b-469c-ab71-304eec81b614" // CoolJWB
);
public static String DATE_STORAGE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
public static final Map<String, ChatColor> CHAT_COLOR_NAMES = new HashMap<>();
public static final List<ChatColor> CHAT_COLOR_POOL = Arrays.asList(
@ -122,9 +135,9 @@ public class FUtil
return ConfigEntry.SERVER_OWNERS.getStringList().contains(name) || ConfigEntry.SERVER_EXECUTIVES.getStringList().contains(name) || ConfigEntry.SERVER_ASSISTANT_EXECUTIVES.getStringList().contains(name);
}
public static boolean isDeveloper(String name)
public static boolean isDeveloper(Player player)
{
return FUtil.DEVELOPERS.contains(name);
return DEVELOPERS.contains(player.getUniqueId().toString());
}
public static boolean inDeveloperMode()