mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
commit
216234ea01
@ -22,8 +22,7 @@ import org.bukkit.entity.Player;
|
|||||||
public class AdminList extends FreedomService
|
public class AdminList extends FreedomService
|
||||||
{
|
{
|
||||||
public static final List<String> vanished = new ArrayList<>();
|
public static final List<String> vanished = new ArrayList<>();
|
||||||
public final List<String> verifiedNoAdmin = new ArrayList<>();
|
public final Map<String, List<String>> verifiedNoAdmin = Maps.newHashMap();
|
||||||
public final Map<String, List<String>> verifiedNoAdminIps = Maps.newHashMap();
|
|
||||||
private final Set<Admin> allAdmins = Sets.newHashSet(); // Includes disabled admins
|
private final Set<Admin> allAdmins = Sets.newHashSet(); // Includes disabled admins
|
||||||
// Only active admins below
|
// Only active admins below
|
||||||
private final Set<Admin> activeAdmins = Sets.newHashSet();
|
private final Set<Admin> activeAdmins = Sets.newHashSet();
|
||||||
@ -240,8 +239,7 @@ public class AdminList extends FreedomService
|
|||||||
|
|
||||||
public boolean isVerifiedAdmin(Player player)
|
public boolean isVerifiedAdmin(Player player)
|
||||||
{
|
{
|
||||||
// Fix of issue FS-33
|
return verifiedNoAdmin.containsKey(player.getName()) && verifiedNoAdmin.get(player.getName()).contains(FUtil.getIp(player));
|
||||||
return !verifiedNoAdmin.contains(player.getName()) || verifiedNoAdminIps.containsKey(player.getName()) && !verifiedNoAdminIps.get(player.getName()).contains(FUtil.getIp(player));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isIdentityMatched(Player player)
|
public boolean isIdentityMatched(Player player)
|
||||||
@ -404,13 +402,8 @@ public class AdminList extends FreedomService
|
|||||||
return ipTable;
|
return ipTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getVerifiedNoAdmin()
|
public Map<String, List<String>> getVerifiedNoAdmin()
|
||||||
{
|
{
|
||||||
return verifiedNoAdmin;
|
return verifiedNoAdmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, List<String>> getVerifiedNoAdminIps()
|
|
||||||
{
|
|
||||||
return verifiedNoAdminIps;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -220,7 +220,6 @@ public class Command_saconfig extends FreedomCommand
|
|||||||
if (plugin.al.isVerifiedAdmin(player))
|
if (plugin.al.isVerifiedAdmin(player))
|
||||||
{
|
{
|
||||||
plugin.al.verifiedNoAdmin.remove(player.getName());
|
plugin.al.verifiedNoAdmin.remove(player.getName());
|
||||||
plugin.al.verifiedNoAdminIps.remove(player.getName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.al.save(admin);
|
plugin.al.save(admin);
|
||||||
|
@ -34,25 +34,21 @@ public class Command_verifynoadmin extends FreedomCommand
|
|||||||
|
|
||||||
if (plugin.al.isAdminImpostor(player))
|
if (plugin.al.isAdminImpostor(player))
|
||||||
{
|
{
|
||||||
if (!plugin.al.verifiedNoAdmin.contains(player.getName()))
|
|
||||||
{
|
|
||||||
plugin.al.verifiedNoAdmin.add(player.getName());
|
|
||||||
}
|
|
||||||
String ip = FUtil.getIp(player);
|
String ip = FUtil.getIp(player);
|
||||||
if (!plugin.al.verifiedNoAdminIps.containsKey(player.getName()))
|
if (!plugin.al.verifiedNoAdmin.containsKey(player.getName()))
|
||||||
{
|
{
|
||||||
List<String> ips = new ArrayList<>();
|
List<String> ips = new ArrayList<>();
|
||||||
ips.add(ip);
|
ips.add(ip);
|
||||||
plugin.al.verifiedNoAdminIps.put(player.getName(), ips);
|
plugin.al.verifiedNoAdmin.put(player.getName(), ips);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
List<String> ips = plugin.al.verifiedNoAdminIps.get(player.getName());
|
List<String> ips = plugin.al.verifiedNoAdmin.get(player.getName());
|
||||||
if (!ips.contains(ip))
|
if (!ips.contains(ip))
|
||||||
{
|
{
|
||||||
ips.add(ip);
|
ips.add(ip);
|
||||||
plugin.al.verifiedNoAdmin.remove(player.getName());
|
plugin.al.verifiedNoAdmin.remove(player.getName());
|
||||||
plugin.al.verifiedNoAdminIps.put(player.getName(), ips);
|
plugin.al.verifiedNoAdmin.put(player.getName(), ips);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugin.rm.updateDisplay(player);
|
plugin.rm.updateDisplay(player);
|
||||||
|
@ -72,9 +72,10 @@ public class FUtil
|
|||||||
"c8e5af82-6aba-4dd7-83e8-474381380cc9", // Paldiu
|
"c8e5af82-6aba-4dd7-83e8-474381380cc9", // Paldiu
|
||||||
"38ea7c82-7bdc-4f48-b7fd-0e93fc26813d", // AwesomePinch
|
"38ea7c82-7bdc-4f48-b7fd-0e93fc26813d", // AwesomePinch
|
||||||
"ba5aafba-9012-418f-9819-a7020d591068", // TFTWPhoenix
|
"ba5aafba-9012-418f-9819-a7020d591068", // TFTWPhoenix
|
||||||
"b051abdf-66d1-48c0-96ef-67fb8af96f2a" // Abhi
|
"b051abdf-66d1-48c0-96ef-67fb8af96f2a", // Abhi
|
||||||
|
"2e06e049-24c8-42e4-8bcf-d35372af31e6" // unsuperiordev
|
||||||
);
|
);
|
||||||
public static final List<String> DEVELOPER_NAMES = Arrays.asList("Madgeek1450", "Prozza", "WickedGamingUK", "Wild1145", "aggelosQQ", "scripthead", "CoolJWB", "elmon_", "speednt", "SupItsDillon", "Paldiu", "AwesomePinch", "TFTWPhoenix","Spigot_Abhiram");
|
public static final List<String> DEVELOPER_NAMES = Arrays.asList("Madgeek1450", "Prozza", "WickedGamingUK", "Wild1145", "aggelosQQ", "scripthead", "CoolJWB", "elmon_", "speednt", "SupItsDillon", "Paldiu", "AwesomePinch", "TFTWPhoenix","Spigot_Abhiram", "unsuperiordev");
|
||||||
public static final Map<String, ChatColor> CHAT_COLOR_NAMES = new HashMap<>();
|
public static final Map<String, ChatColor> CHAT_COLOR_NAMES = new HashMap<>();
|
||||||
public static final List<ChatColor> CHAT_COLOR_POOL = Arrays.asList(
|
public static final List<ChatColor> CHAT_COLOR_POOL = Arrays.asList(
|
||||||
ChatColor.DARK_RED,
|
ChatColor.DARK_RED,
|
||||||
|
Loading…
Reference in New Issue
Block a user