Removed most singleton patterns. Resolves #181

This commit is contained in:
unknown
2014-05-19 19:32:25 +02:00
parent 730b0e2c83
commit e942f0bf75
46 changed files with 316 additions and 382 deletions

View File

@ -66,7 +66,6 @@ public class TFM_ServerInterface
public static void handlePlayerLogin(PlayerLoginEvent event)
{
final Server server = TotalFreedomMod.server;
final TFM_BanManager banManager = TFM_BanManager.getInstance();
final Player player = event.getPlayer();
@ -102,9 +101,9 @@ public class TFM_ServerInterface
if (!isAdmin) // If the player is not an admin
{
// UUID bans
if (banManager.isUuidBanned(uuid))
if (TFM_BanManager.isUuidBanned(uuid))
{
final TFM_Ban ban = banManager.getByUuid(uuid);
final TFM_Ban ban = TFM_BanManager.getByUuid(uuid);
String kickMessage = ChatColor.RED + "You are temporarily banned from this server.\nAppeal at http://totalfreedom.boards.net/.";
@ -122,9 +121,9 @@ public class TFM_ServerInterface
return;
}
if (banManager.isIpBanned(ip))
if (TFM_BanManager.isIpBanned(ip))
{
final TFM_Ban ban = banManager.getByIp(ip);
final TFM_Ban ban = TFM_BanManager.getByIp(ip);
String kickMessage = ChatColor.RED + "Your IP address is temporarily banned from this server.\nAppeal at http://totalfreedom.boards.net/.";