Clean up sources of compile warnings.

Move anything that causes deprecation warnings into TFM_DepreciationAggregator if no alternative implementation possible.
This commit is contained in:
StevenLawson
2014-07-19 21:02:00 -04:00
parent 2b597867f0
commit 183277db21
25 changed files with 166 additions and 83 deletions

View File

@ -73,11 +73,11 @@ public class TFM_Util
{
try
{
if (type.getName() != null)
if (TFM_DepreciationAggregator.getName_EntityType(type) != null)
{
if (Creature.class.isAssignableFrom(type.getEntityClass()))
{
mobtypes.put(type.getName().toLowerCase(), type);
mobtypes.put(TFM_DepreciationAggregator.getName_EntityType(type).toLowerCase(), type);
}
}
}
@ -527,7 +527,6 @@ public class TFM_Util
TFM_Util.bcastMsg(ChatColor.RED + player.getName() + " has been banned for 1 minute.");
TFM_BanManager.addIpBan(new TFM_Ban(ip, player.getName(), "AutoEject", expires, kickMessage));
TFM_BanManager.addUuidBan(new TFM_Ban(TFM_Util.getUuid(player), player.getName(), "AutoEject", expires, kickMessage));
player.kickPlayer(kickMessage);
@ -542,7 +541,6 @@ public class TFM_Util
TFM_Util.bcastMsg(ChatColor.RED + player.getName() + " has been banned for 3 minutes.");
TFM_BanManager.addIpBan(new TFM_Ban(ip, player.getName(), "AutoEject", expires, kickMessage));
TFM_BanManager.addUuidBan(new TFM_Ban(TFM_Util.getUuid(player), player.getName(), "AutoEject", expires, kickMessage));
player.kickPlayer(kickMessage);
@ -963,7 +961,6 @@ public class TFM_Util
field.setAccessible(true);
return (T) field.get(from);
}
catch (NoSuchFieldException ex)
{
@ -1013,7 +1010,6 @@ public class TFM_Util
String packageName = Bukkit.getServer().getClass().getPackage().getName();
return packageName.substring(packageName.lastIndexOf('.') + 1);
}
public static class TFM_EntityWiper