From 56d6fd81b41d8499b6441c66d52b8e304df8b6b6 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Wed, 29 Jun 2016 16:18:12 +0200 Subject: [PATCH] Cleanup --- .../java/fr/xephi/authme/hooks/BungeeCordMessage.java | 1 - .../fr/xephi/authme/permission/AuthGroupHandler.java | 10 ++++++---- .../fr/xephi/authme/process/join/AsynchronousJoin.java | 1 - .../process/quit/ProcessSyncronousPlayerQuit.java | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java b/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java index 1fda06ba..758d0446 100644 --- a/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java +++ b/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java @@ -4,7 +4,6 @@ import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.cache.SessionManager; import fr.xephi.authme.cache.auth.PlayerAuth; import fr.xephi.authme.cache.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; diff --git a/src/main/java/fr/xephi/authme/permission/AuthGroupHandler.java b/src/main/java/fr/xephi/authme/permission/AuthGroupHandler.java index a33cb7c5..bbad6f0f 100644 --- a/src/main/java/fr/xephi/authme/permission/AuthGroupHandler.java +++ b/src/main/java/fr/xephi/authme/permission/AuthGroupHandler.java @@ -6,6 +6,8 @@ import fr.xephi.authme.cache.limbo.LimboPlayer; import fr.xephi.authme.settings.NewSetting; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.PluginSettings; +import fr.xephi.authme.settings.properties.SecuritySettings; + import org.bukkit.entity.Player; import javax.inject.Inject; @@ -51,18 +53,18 @@ public class AuthGroupHandler { switch (group) { case UNREGISTERED: // Remove the other group type groups, set the current group - permissionsManager.removeGroups(player, Arrays.asList(Settings.getRegisteredGroup, Settings.getUnloggedinGroup)); + permissionsManager.removeGroups(player, Arrays.asList(Settings.getRegisteredGroup, settings.getProperty(SecuritySettings.UNLOGGEDIN_GROUP))); return permissionsManager.addGroup(player, Settings.unRegisteredGroup); case REGISTERED: // Remove the other group type groups, set the current group - permissionsManager.removeGroups(player, Arrays.asList(Settings.unRegisteredGroup, Settings.getUnloggedinGroup)); + permissionsManager.removeGroups(player, Arrays.asList(Settings.unRegisteredGroup, settings.getProperty(SecuritySettings.UNLOGGEDIN_GROUP))); return permissionsManager.addGroup(player, Settings.getRegisteredGroup); case NOT_LOGGED_IN: // Remove the other group type groups, set the current group permissionsManager.removeGroups(player, Arrays.asList(Settings.unRegisteredGroup, Settings.getRegisteredGroup)); - return permissionsManager.addGroup(player, Settings.getUnloggedinGroup); + return permissionsManager.addGroup(player, settings.getProperty(SecuritySettings.UNLOGGEDIN_GROUP)); case LOGGED_IN: // Get the limbo player data @@ -76,7 +78,7 @@ public class AuthGroupHandler { // Remove the other group types groups, set the real group permissionsManager.removeGroups(player, - Arrays.asList(Settings.unRegisteredGroup, Settings.getRegisteredGroup, Settings.getUnloggedinGroup) + Arrays.asList(Settings.unRegisteredGroup, Settings.getRegisteredGroup, settings.getProperty(SecuritySettings.UNLOGGEDIN_GROUP)) ); return permissionsManager.addGroup(player, realGroup); default: diff --git a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java index 7c83ec28..390a3f9b 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java @@ -9,7 +9,6 @@ import fr.xephi.authme.cache.limbo.LimboCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.events.ProtectInventoryEvent; import fr.xephi.authme.hooks.PluginHooks; -import fr.xephi.authme.listener.protocollib.ProtocolLibService; import fr.xephi.authme.output.MessageKey; import fr.xephi.authme.permission.AuthGroupType; import fr.xephi.authme.permission.PlayerStatePermission; diff --git a/src/main/java/fr/xephi/authme/process/quit/ProcessSyncronousPlayerQuit.java b/src/main/java/fr/xephi/authme/process/quit/ProcessSyncronousPlayerQuit.java index 13a6a7b3..88153345 100644 --- a/src/main/java/fr/xephi/authme/process/quit/ProcessSyncronousPlayerQuit.java +++ b/src/main/java/fr/xephi/authme/process/quit/ProcessSyncronousPlayerQuit.java @@ -3,7 +3,6 @@ package fr.xephi.authme.process.quit; import fr.xephi.authme.cache.backup.JsonCache; import fr.xephi.authme.cache.limbo.LimboCache; import fr.xephi.authme.cache.limbo.LimboPlayer; -import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.process.ProcessService; import fr.xephi.authme.process.SynchronousProcess; import fr.xephi.authme.settings.properties.RestrictionSettings;