mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 19:46:42 +00:00
Old admin mode and commandspy saving
This commit is contained in:
@ -9,6 +9,8 @@ public interface Displayable
|
||||
|
||||
public String getTag();
|
||||
|
||||
public String getAbbr();
|
||||
|
||||
public ChatColor getColor();
|
||||
|
||||
public String getColoredName();
|
||||
|
@ -18,6 +18,8 @@ public enum Rank implements Displayable
|
||||
private final Type type;
|
||||
@Getter
|
||||
private final String name;
|
||||
@Getter
|
||||
private final String abbr;
|
||||
private final String determiner;
|
||||
@Getter
|
||||
private final String tag;
|
||||
@ -30,9 +32,10 @@ public enum Rank implements Displayable
|
||||
{
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
this.abbr = abbr;
|
||||
this.determiner = determiner;
|
||||
this.tag = abbr.isEmpty() ? "" : "[" + abbr + "]";
|
||||
this.coloredTag = abbr.isEmpty() ? "" : ChatColor.DARK_GRAY + "[" + color + abbr + ChatColor.DARK_GRAY + "]" + color;
|
||||
this.coloredTag = ChatColor.DARK_GRAY + "[" + color + abbr + ChatColor.DARK_GRAY + "]" + color;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@ -48,6 +51,12 @@ public enum Rank implements Displayable
|
||||
return determiner + " " + color + ChatColor.ITALIC + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAbbr()
|
||||
{
|
||||
return abbr;
|
||||
}
|
||||
|
||||
public boolean isConsole()
|
||||
{
|
||||
return getType() == Type.ADMIN_CONSOLE;
|
||||
@ -98,21 +107,6 @@ public enum Rank implements Displayable
|
||||
}
|
||||
}
|
||||
|
||||
public Rank getPlayerVariant()
|
||||
{
|
||||
switch (this)
|
||||
{
|
||||
case TELNET_ADMIN:
|
||||
case TELNET_CONSOLE:
|
||||
return TELNET_ADMIN;
|
||||
case SENIOR_ADMIN:
|
||||
case SENIOR_CONSOLE:
|
||||
return SENIOR_ADMIN;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Rank findRank(String string)
|
||||
{
|
||||
try
|
||||
|
@ -13,6 +13,8 @@ public enum Title implements Displayable
|
||||
@Getter
|
||||
private final String name;
|
||||
@Getter
|
||||
private final String abbr;
|
||||
@Getter
|
||||
private final String tag;
|
||||
@Getter
|
||||
private final String coloredTag;
|
||||
@ -23,8 +25,9 @@ public enum Title implements Displayable
|
||||
{
|
||||
this.determiner = determiner;
|
||||
this.name = name;
|
||||
this.tag = "[" + tag + "]";
|
||||
this.coloredTag = ChatColor.DARK_GRAY + "[" + color + tag + ChatColor.DARK_GRAY + "]" + color;
|
||||
this.abbr = tag;
|
||||
this.tag = "[" + tag + "]";
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@ -40,4 +43,10 @@ public enum Title implements Displayable
|
||||
return determiner + " " + color + ChatColor.ITALIC + name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAbbr()
|
||||
{
|
||||
return abbr;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user