diff --git a/src/main/java/me/StevenLawson/TotalFreedomMod/bridge/DiscordBridge.java b/src/main/java/me/StevenLawson/TotalFreedomMod/bridge/DiscordBridge.java index d71acbe..89014de 100644 --- a/src/main/java/me/StevenLawson/TotalFreedomMod/bridge/DiscordBridge.java +++ b/src/main/java/me/StevenLawson/TotalFreedomMod/bridge/DiscordBridge.java @@ -78,75 +78,6 @@ public class DiscordBridge { } } - /*// TODO: Make this shitty code better (I was very tired from a blood test whilst writing this) - - ArrayList seniorAdmins = new ArrayList<>(); - ArrayList developers = new ArrayList<>(); - ArrayList impostors = new ArrayList<>(); - ArrayList deopped = new ArrayList<>(); - ArrayList operators = new ArrayList<>(); - ArrayList superAdmins = new ArrayList<>(); - ArrayList superTelnetAdmins = new ArrayList<>(); - ArrayList owners = new ArrayList<>(); - - for (org.bukkit.entity.Player player : Bukkit.getOnlinePlayers()) { - PlayerRank rank = PlayerRank.fromSender(player); - - if (EssentialsBridge.getEssentialsUser(player.getName()).isVanished()) { - continue; - } - - if (rank.equals(PlayerRank.IMPOSTOR)) { - impostors.add(player.getName()); - } else if (rank.equals(PlayerRank.DEVELOPER)) { - developers.add(player.getName()); - } else if (rank.equals(PlayerRank.NON_OP)) { - deopped.add(player.getName()); - } else if (rank.equals(PlayerRank.SENIOR)) { - seniorAdmins.add(player.getName()); - } else if (rank.equals(PlayerRank.OWNER)) { - owners.add(player.getName()); - } else if (rank.equals(PlayerRank.OP)) { - operators.add(player.getName()); - } else if (rank.equals(PlayerRank.SUPER)) { - superAdmins.add(player.getName()); - } else if (rank.equals(PlayerRank.TELNET)) { - superTelnetAdmins.add(player.getName()); - } - } - - if (owners.size() > 0) { - builder.addField(String.format("Owners (%s)", owners.size()), String.join(", ", owners)); - } - - if (seniorAdmins.size() > 0) { - builder.addField(String.format("Senior Admins (%s)", seniorAdmins.size()), String.join(", ", seniorAdmins)); - } - - if (developers.size() > 0) { - builder.addField(String.format("Developers (%s)", developers.size()), String.join(", ", developers)); - } - - if (superTelnetAdmins.size() > 0) { - builder.addField(String.format("Super Telnet Admins (%s)", superTelnetAdmins.size()), String.join(", ", superTelnetAdmins)); - } - - if (superAdmins.size() > 0) { - builder.addField(String.format("Super Admins (%s)", superAdmins.size()), String.join(", ", seniorAdmins)); - } - - if (operators.size() > 0) { - builder.addField(String.format("Operators (%s)", operators.size()), String.join(", ", operators)); - } - - if (deopped.size() > 0) { - builder.addField(String.format("Non-Operators (%s)", deopped.size()), String.join(", ", deopped)); - } - - if (impostors.size() > 0) { - builder.addField(String.format("Impostors (%s)", impostors.size()), String.join(", ", impostors)); - }*/ - CHANNEL.sendMessage(builder); } else { String format = MainConfig.getString(ConfigurationEntry.DISCORD_FORMAT);