mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
shorten Administrator
This commit is contained in:
parent
090c445aa9
commit
6b3a765c90
@ -10,7 +10,7 @@ public enum Rank implements Displayable
|
|||||||
OP("an", "Operator", Type.PLAYER, "OP", ChatColor.GREEN, null, false),
|
OP("an", "Operator", Type.PLAYER, "OP", ChatColor.GREEN, null, false),
|
||||||
TRIAL_MOD("a", "Trial Moderator", Type.STAFF, "Trial Mod", ChatColor.AQUA, org.bukkit.ChatColor.AQUA, true),
|
TRIAL_MOD("a", "Trial Moderator", Type.STAFF, "Trial Mod", ChatColor.AQUA, org.bukkit.ChatColor.AQUA, true),
|
||||||
MOD("a", "Moderator", Type.STAFF, "Mod", ChatColor.DARK_GREEN, org.bukkit.ChatColor.DARK_GREEN, true),
|
MOD("a", "Moderator", Type.STAFF, "Mod", ChatColor.DARK_GREEN, org.bukkit.ChatColor.DARK_GREEN, true),
|
||||||
ADMIN("an", "Administrator", Type.STAFF, "Administrator", ChatColor.GOLD, org.bukkit.ChatColor.GOLD, true),
|
ADMIN("an", "Administrator", Type.STAFF, "Admin", ChatColor.GOLD, org.bukkit.ChatColor.GOLD, true),
|
||||||
MOD_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false),
|
MOD_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false),
|
||||||
ADMIN_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false);
|
ADMIN_CONSOLE("the", "Console", Type.STAFF_CONSOLE, "Console", ChatColor.DARK_PURPLE, null, false);
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -106,6 +106,18 @@ public class StaffList extends FreedomService
|
|||||||
return staffMember != null && staffMember.isActive();
|
return staffMember != null && staffMember.isActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isStaff(Player player)
|
||||||
|
{
|
||||||
|
if (player == null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
StaffMember staffMember = getAdmin(player);
|
||||||
|
|
||||||
|
return staffMember != null && staffMember.isActive();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isMod(CommandSender sender)
|
public boolean isMod(CommandSender sender)
|
||||||
{
|
{
|
||||||
StaffMember staffMember = getAdmin(sender);
|
StaffMember staffMember = getAdmin(sender);
|
||||||
|
@ -47,6 +47,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
|
import static org.bukkit.Bukkit.getServer;
|
||||||
|
|
||||||
public class FUtil
|
public class FUtil
|
||||||
{
|
{
|
||||||
@ -627,7 +628,7 @@ public class FUtil
|
|||||||
|
|
||||||
public static String getNMSVersion()
|
public static String getNMSVersion()
|
||||||
{
|
{
|
||||||
String packageName = Bukkit.getServer().getClass().getPackage().getName();
|
String packageName = getServer().getClass().getPackage().getName();
|
||||||
return packageName.substring(packageName.lastIndexOf('.') + 1);
|
return packageName.substring(packageName.lastIndexOf('.') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user