Add plurals for most ranks and add ordinals that rank them by power.

This commit is contained in:
business-goose 2022-03-20 15:23:02 +00:00
parent 565152e09a
commit 0cc0839861

View file

@ -9,25 +9,38 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import static me.StevenLawson.TotalFreedomMod.util.Utilities.DEVELOPERS; import static me.StevenLawson.TotalFreedomMod.util.Utilities.DEVELOPERS;
import static me.StevenLawson.TotalFreedomMod.util.Utilities.getPluginFile;
public enum PlayerRank 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]", "Impostors", 0),
IMPOSTOR("an " + ChatColor.YELLOW + ChatColor.UNDERLINE + "Impostor", ChatColor.YELLOW.toString() + ChatColor.UNDERLINE + "[IMP]"), NON_OP("a " + ChatColor.GREEN + "Non-OP", ChatColor.GREEN.toString(), "Non-Operators", 1),
NON_OP("a " + ChatColor.GREEN + "Non-OP", ChatColor.GREEN.toString()), OP("an " + ChatColor.RED + "OP", ChatColor.RED + "[OP]", "Operators" ,2),
OP("an " + ChatColor.RED + "OP", ChatColor.RED + "[OP]"), SUPER("a " + ChatColor.GOLD + "Super Admin", ChatColor.GOLD + "[SA]", "Super Admins", 3),
SUPER("a " + ChatColor.GOLD + "Super Admin", ChatColor.GOLD + "[SA]"), DEVELOPER("a " + ChatColor.DARK_PURPLE + "Developer", ChatColor.DARK_PURPLE + "[Dev]", "Developers", 4),
TELNET("a " + ChatColor.DARK_GREEN + "Super Telnet Admin", ChatColor.DARK_GREEN + "[STA]"), 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("a " + ChatColor.LIGHT_PURPLE + "Senior Admin", ChatColor.LIGHT_PURPLE + "[SrA]", "Senior Admins", 6),
OWNER("the " + ChatColor.BLUE + "Owner", ChatColor.BLUE + "[Owner]"), OWNER("the " + ChatColor.BLUE + "Owner", ChatColor.BLUE + "[Owner]", "Owners", 7),
CONSOLE("The " + ChatColor.DARK_PURPLE + "Console", ChatColor.DARK_PURPLE + "[Console]"); CONSOLE("The " + ChatColor.DARK_PURPLE + "Console", ChatColor.DARK_PURPLE + "[Console]", 8);
private final String loginMessage; private final String loginMessage;
private final String prefix; 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.loginMessage = loginMessage;
this.prefix = prefix; this.prefix = prefix;
this.plural = plural;
this.ordinal = ordinal;
} }
public static String getLoginMessage(CommandSender sender) public static String getLoginMessage(CommandSender sender)