From 0cc083986122a5b6df4608c3a6ef53f4f9866b1d Mon Sep 17 00:00:00 2001 From: business-goose Date: Sun, 20 Mar 2022 15:23:02 +0000 Subject: [PATCH] Add plurals for most ranks and add ordinals that rank them by power. --- .../TotalFreedomMod/player/PlayerRank.java | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/main/java/me/StevenLawson/TotalFreedomMod/player/PlayerRank.java b/src/main/java/me/StevenLawson/TotalFreedomMod/player/PlayerRank.java index b6e4f10..596bae2 100644 --- a/src/main/java/me/StevenLawson/TotalFreedomMod/player/PlayerRank.java +++ b/src/main/java/me/StevenLawson/TotalFreedomMod/player/PlayerRank.java @@ -9,25 +9,38 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import static me.StevenLawson.TotalFreedomMod.util.Utilities.DEVELOPERS; +import static me.StevenLawson.TotalFreedomMod.util.Utilities.getPluginFile; public enum PlayerRank { - DEVELOPER("a " + ChatColor.DARK_PURPLE + "Developer", ChatColor.DARK_PURPLE + "[Dev]"), - IMPOSTOR("an " + ChatColor.YELLOW + ChatColor.UNDERLINE + "Impostor", ChatColor.YELLOW.toString() + ChatColor.UNDERLINE + "[IMP]"), - NON_OP("a " + ChatColor.GREEN + "Non-OP", ChatColor.GREEN.toString()), - OP("an " + ChatColor.RED + "OP", ChatColor.RED + "[OP]"), - SUPER("a " + ChatColor.GOLD + "Super Admin", ChatColor.GOLD + "[SA]"), - TELNET("a " + ChatColor.DARK_GREEN + "Super Telnet Admin", ChatColor.DARK_GREEN + "[STA]"), - SENIOR("a " + ChatColor.LIGHT_PURPLE + "Senior Admin", ChatColor.LIGHT_PURPLE + "[SrA]"), - OWNER("the " + ChatColor.BLUE + "Owner", ChatColor.BLUE + "[Owner]"), - CONSOLE("The " + ChatColor.DARK_PURPLE + "Console", ChatColor.DARK_PURPLE + "[Console]"); + IMPOSTOR("an " + ChatColor.YELLOW + ChatColor.UNDERLINE + "Impostor", ChatColor.YELLOW.toString() + ChatColor.UNDERLINE + "[IMP]", "Impostors", 0), + NON_OP("a " + ChatColor.GREEN + "Non-OP", ChatColor.GREEN.toString(), "Non-Operators", 1), + OP("an " + ChatColor.RED + "OP", ChatColor.RED + "[OP]", "Operators" ,2), + SUPER("a " + ChatColor.GOLD + "Super Admin", ChatColor.GOLD + "[SA]", "Super Admins", 3), + DEVELOPER("a " + ChatColor.DARK_PURPLE + "Developer", ChatColor.DARK_PURPLE + "[Dev]", "Developers", 4), + TELNET("a " + ChatColor.DARK_GREEN + "Super Telnet Admin", ChatColor.DARK_GREEN + "[STA]", "Super Telnet Admins", 5), + SENIOR("a " + ChatColor.LIGHT_PURPLE + "Senior Admin", ChatColor.LIGHT_PURPLE + "[SrA]", "Senior Admins", 6), + OWNER("the " + ChatColor.BLUE + "Owner", ChatColor.BLUE + "[Owner]", "Owners", 7), + CONSOLE("The " + ChatColor.DARK_PURPLE + "Console", ChatColor.DARK_PURPLE + "[Console]", 8); private final String loginMessage; private final String prefix; + private final String plural; + private final int ordinal; - private PlayerRank(String loginMessage, String prefix) + + PlayerRank(String loginMessage, String prefix, int ordinal) { + this.loginMessage = loginMessage; + this.prefix = prefix; + this.plural = ""; + this.ordinal = ordinal; + } + + PlayerRank(String loginMessage, String prefix, String plural, int ordinal) { this.loginMessage = loginMessage; this.prefix = prefix; + this.plural = plural; + this.ordinal = ordinal; } public static String getLoginMessage(CommandSender sender)