Remove old commented out code

This commit is contained in:
business-goose 2022-03-20 17:52:05 +00:00
parent 26275745d0
commit cb7f603928

View file

@ -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<String> seniorAdmins = new ArrayList<>();
ArrayList<String> developers = new ArrayList<>();
ArrayList<String> impostors = new ArrayList<>();
ArrayList<String> deopped = new ArrayList<>();
ArrayList<String> operators = new ArrayList<>();
ArrayList<String> superAdmins = new ArrayList<>();
ArrayList<String> superTelnetAdmins = new ArrayList<>();
ArrayList<String> 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); CHANNEL.sendMessage(builder);
} else { } else {
String format = MainConfig.getString(ConfigurationEntry.DISCORD_FORMAT); String format = MainConfig.getString(ConfigurationEntry.DISCORD_FORMAT);