mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-13 14:48:34 +00:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user