This commit is contained in:
DNx5 2016-02-25 16:45:35 +07:00
parent 69092e9a9c
commit 8536f85361

View File

@ -104,15 +104,14 @@ public class AuthMe extends JavaPlugin {
// Private Instances // Private Instances
private static AuthMe plugin; private static AuthMe plugin;
private static Server server; private static Server server;
private Management management; /*
private CommandHandler commandHandler = null; * Maps and stuff
private PermissionsManager permsMan = null; * TODO: Clean up and Move into a manager
private NewSetting newSettings; */
private Messages messages; public final ConcurrentHashMap<String, BukkitTask> sessions = new ConcurrentHashMap<>();
private JsonCache playerBackup; public final ConcurrentHashMap<String, Integer> captcha = new ConcurrentHashMap<>();
private PasswordSecurity passwordSecurity; public final ConcurrentHashMap<String, String> cap = new ConcurrentHashMap<>();
private DataSource database; public final ConcurrentHashMap<String, String> realIp = new ConcurrentHashMap<>();
/* /*
* Public Instances * Public Instances
* TODO #432: Encapsulation * TODO #432: Encapsulation
@ -122,7 +121,6 @@ public class AuthMe extends JavaPlugin {
public DataManager dataManager; public DataManager dataManager;
public OtherAccounts otherAccounts; public OtherAccounts otherAccounts;
public Location essentialsSpawn; public Location essentialsSpawn;
/* /*
* Plugin Hooks * Plugin Hooks
* TODO: Move into modules * TODO: Move into modules
@ -133,15 +131,14 @@ public class AuthMe extends JavaPlugin {
public AuthMeInventoryPacketAdapter inventoryProtector; public AuthMeInventoryPacketAdapter inventoryProtector;
public AuthMeTabCompletePacketAdapter tabComplete; public AuthMeTabCompletePacketAdapter tabComplete;
public AuthMeTablistPacketAdapter tablistHider; public AuthMeTablistPacketAdapter tablistHider;
private Management management;
/* private CommandHandler commandHandler = null;
* Maps and stuff private PermissionsManager permsMan = null;
* TODO: Clean up and Move into a manager private NewSetting newSettings;
*/ private Messages messages;
public final ConcurrentHashMap<String, BukkitTask> sessions = new ConcurrentHashMap<>(); private JsonCache playerBackup;
public final ConcurrentHashMap<String, Integer> captcha = new ConcurrentHashMap<>(); private PasswordSecurity passwordSecurity;
public final ConcurrentHashMap<String, String> cap = new ConcurrentHashMap<>(); private DataSource database;
public final ConcurrentHashMap<String, String> realIp = new ConcurrentHashMap<>();
/** /**
* Get the plugin's instance. * Get the plugin's instance.
@ -667,14 +664,14 @@ public class AuthMe extends JavaPlugin {
if (newSettings.getProperty(RestrictionSettings.DENY_TABCOMPLETE_BEFORE_LOGIN) && tabComplete == null) { if (newSettings.getProperty(RestrictionSettings.DENY_TABCOMPLETE_BEFORE_LOGIN) && tabComplete == null) {
tabComplete = new AuthMeTabCompletePacketAdapter(this); tabComplete = new AuthMeTabCompletePacketAdapter(this);
tabComplete.register(); tabComplete.register();
} else if (inventoryProtector != null) { } else if (tabComplete != null) {
tabComplete.unregister(); tabComplete.unregister();
tabComplete = null; tabComplete = null;
} }
if (newSettings.getProperty(RestrictionSettings.HIDE_TABLIST_BEFORE_LOGIN) && tablistHider == null) { if (newSettings.getProperty(RestrictionSettings.HIDE_TABLIST_BEFORE_LOGIN) && tablistHider == null) {
tablistHider = new AuthMeTablistPacketAdapter(this); tablistHider = new AuthMeTablistPacketAdapter(this);
tablistHider.register(); tablistHider.register();
} else if (inventoryProtector != null) { } else if (tablistHider != null) {
tablistHider.unregister(); tablistHider.unregister();
tablistHider = null; tablistHider = null;
} }