Remove deprecated methods and variables.

This commit is contained in:
Steven Lawson 2013-08-10 13:17:32 -04:00
parent f23c61d0b3
commit 2c4eca8551
2 changed files with 7 additions and 70 deletions

View File

@ -83,12 +83,6 @@ public class TFM_Util
TFM_Util.bcastMsg(adminName + " - " + action, (isRed ? ChatColor.RED : ChatColor.AQUA)); TFM_Util.bcastMsg(adminName + " - " + action, (isRed ? ChatColor.RED : ChatColor.AQUA));
} }
@Deprecated
public static String implodeStringList(String glue, List<String> pieces)
{
return StringUtils.join(pieces, glue);
}
public static String formatLocation(Location in_loc) public static String formatLocation(Location in_loc)
{ {
return String.format("%s: (%d, %d, %d)", return String.format("%s: (%d, %d, %d)",
@ -240,12 +234,6 @@ public class TFM_Util
} }
} }
@Deprecated
public static boolean isUserSuperadmin(CommandSender user)
{
return TFM_SuperadminList.isUserSuperadmin(user);
}
public static int wipeEntities(boolean wipe_explosives, boolean wipe_vehicles) public static int wipeEntities(boolean wipe_explosives, boolean wipe_vehicles)
{ {
int removed = 0; int removed = 0;
@ -404,8 +392,8 @@ public class TFM_Util
TFM_Util.bcastMsg(ChatColor.RED + p.getName() + " has been banned for 1 minute."); TFM_Util.bcastMsg(ChatColor.RED + p.getName() + " has been banned for 1 minute.");
TFM_Util.banIP(player_ip, kickMessage, "AutoEject", expires); TFM_ServerInterface.banIP(player_ip, kickMessage, "AutoEject", expires);
TFM_Util.banUsername(p.getName(), kickMessage, "AutoEject", expires); TFM_ServerInterface.banUsername(p.getName(), kickMessage, "AutoEject", expires);
p.kickPlayer(kickMessage); p.kickPlayer(kickMessage);
break; break;
@ -418,8 +406,8 @@ public class TFM_Util
TFM_Util.bcastMsg(ChatColor.RED + p.getName() + " has been banned for 3 minutes."); TFM_Util.bcastMsg(ChatColor.RED + p.getName() + " has been banned for 3 minutes.");
TFM_Util.banIP(player_ip, kickMessage, "AutoEject", expires); TFM_ServerInterface.banIP(player_ip, kickMessage, "AutoEject", expires);
TFM_Util.banUsername(p.getName(), kickMessage, "AutoEject", expires); TFM_ServerInterface.banUsername(p.getName(), kickMessage, "AutoEject", expires);
p.kickPlayer(kickMessage); p.kickPlayer(kickMessage);
break; break;
@ -427,13 +415,13 @@ public class TFM_Util
case STRIKE_THREE: case STRIKE_THREE:
{ {
//Bukkit.banIP(player_ip); //Bukkit.banIP(player_ip);
TFM_Util.banIP(player_ip, kickMessage, "AutoEject", null); TFM_ServerInterface.banIP(player_ip, kickMessage, "AutoEject", null);
String[] ip_address_parts = player_ip.split("\\."); String[] ip_address_parts = player_ip.split("\\.");
//Bukkit.banIP(); //Bukkit.banIP();
TFM_Util.banIP(ip_address_parts[0] + "." + ip_address_parts[1] + ".*.*", kickMessage, "AutoEject", null); TFM_ServerInterface.banIP(ip_address_parts[0] + "." + ip_address_parts[1] + ".*.*", kickMessage, "AutoEject", null);
//p.setBanned(true); //p.setBanned(true);
TFM_Util.banUsername(p.getName(), kickMessage, "AutoEject", null); TFM_ServerInterface.banUsername(p.getName(), kickMessage, "AutoEject", null);
TFM_Util.bcastMsg(ChatColor.RED + p.getName() + " has been banned permanently."); TFM_Util.bcastMsg(ChatColor.RED + p.getName() + " has been banned permanently.");
@ -459,12 +447,6 @@ public class TFM_Util
Bukkit.getServer().createWorld(flatlands); Bukkit.getServer().createWorld(flatlands);
} }
@Deprecated
public static boolean isSuperadminImpostor(CommandSender user)
{
return TFM_SuperadminList.isSuperadminImpostor(user);
}
public static String getRank(CommandSender sender) public static String getRank(CommandSender sender)
{ {
if (TFM_SuperadminList.isSuperadminImpostor(sender)) if (TFM_SuperadminList.isSuperadminImpostor(sender))
@ -507,42 +489,6 @@ public class TFM_Util
return "a " + ChatColor.GREEN + "non-OP" + ChatColor.AQUA + "."; return "a " + ChatColor.GREEN + "non-OP" + ChatColor.AQUA + ".";
} }
@Deprecated
public static void banUsername(String name, String reason, String source, Date expire_date)
{
TFM_ServerInterface.banUsername(name, reason, source, expire_date);
}
@Deprecated
public static void unbanUsername(String name)
{
TFM_ServerInterface.unbanUsername(name);
}
@Deprecated
public static boolean isNameBanned(String name)
{
return TFM_ServerInterface.isNameBanned(name);
}
@Deprecated
public static void banIP(String ip, String reason, String source, Date expire_date)
{
TFM_ServerInterface.banIP(ip, reason, source, expire_date);
}
@Deprecated
public static void unbanIP(String ip)
{
TFM_ServerInterface.unbanIP(ip);
}
@Deprecated
public static boolean isIPBanned(String ip)
{
return TFM_ServerInterface.isIPBanned(ip);
}
public static Date parseDateOffset(String time) public static Date parseDateOffset(String time)
{ {
Pattern timePattern = Pattern.compile( Pattern timePattern = Pattern.compile(

View File

@ -154,7 +154,6 @@ public class TotalFreedomMod extends JavaPlugin
TFM_CommandBlockerNew.getInstance().parseBlockingRules(); TFM_CommandBlockerNew.getInstance().parseBlockingRules();
} }
}.runTaskLater(this, 20L); }.runTaskLater(this, 20L);
} }
@Override @Override
@ -327,11 +326,6 @@ public class TotalFreedomMod extends JavaPlugin
TFM_Log.severe("Error loading main config: " + ex.getMessage()); TFM_Log.severe("Error loading main config: " + ex.getMessage());
} }
} }
//
@Deprecated
public static List<String> superadmins = new ArrayList<String>();
@Deprecated
public static List<String> superadmin_ips = new ArrayList<String>();
public static void loadSuperadminConfig() public static void loadSuperadminConfig()
{ {
@ -339,9 +333,6 @@ public class TotalFreedomMod extends JavaPlugin
{ {
TFM_SuperadminList.backupSavedList(); TFM_SuperadminList.backupSavedList();
TFM_SuperadminList.loadSuperadminList(); TFM_SuperadminList.loadSuperadminList();
superadmins = TFM_SuperadminList.getSuperadminNames();
superadmin_ips = TFM_SuperadminList.getSuperadminIPs();
} }
catch (Exception ex) catch (Exception ex)
{ {