[Bleeding] Working on TFM_Admin

This commit is contained in:
unknown
2014-04-08 20:31:04 +02:00
parent 6365672eda
commit ec8a528564
42 changed files with 310 additions and 344 deletions

View File

@ -93,6 +93,20 @@ public class TFM_Util
throw new AssertionError();
}
public static boolean isUniqueId(String uuid)
{
try
{
UUID.fromString(uuid);
}
catch (IllegalArgumentException ex)
{
return false;
}
return true;
}
public static void bcastMsg(String message, ChatColor color)
{
TFM_Log.info(message, true);
@ -139,6 +153,11 @@ public class TFM_Util
Math.round(location.getZ()));
}
public static String formatPlayer(Player player)
{
return player.getName() + " (" + player.getUniqueId() + ")";
}
public static void gotoWorld(CommandSender sender, String targetworld)
{
if (sender instanceof Player)
@ -737,7 +756,7 @@ public class TFM_Util
for (Player player : Bukkit.getOnlinePlayers())
{
if (TFM_SuperadminList.isUserSuperadmin(player))
if (TFM_SuperadminList.isSuperAdmin(player))
{
player.sendMessage("[" + ChatColor.AQUA + "ADMIN" + ChatColor.WHITE + "] " + ChatColor.DARK_RED + name + ": " + ChatColor.AQUA + message);
}