mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-01-28 18:41:37 +01:00
Cleanup
This commit is contained in:
parent
b1b56f2d51
commit
56d6fd81b4
@ -4,7 +4,6 @@ import com.google.common.io.ByteArrayDataInput;
|
|||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
|
|
||||||
import fr.xephi.authme.ConsoleLogger;
|
import fr.xephi.authme.ConsoleLogger;
|
||||||
import fr.xephi.authme.cache.SessionManager;
|
|
||||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||||
import fr.xephi.authme.datasource.DataSource;
|
import fr.xephi.authme.datasource.DataSource;
|
||||||
|
@ -6,6 +6,8 @@ import fr.xephi.authme.cache.limbo.LimboPlayer;
|
|||||||
import fr.xephi.authme.settings.NewSetting;
|
import fr.xephi.authme.settings.NewSetting;
|
||||||
import fr.xephi.authme.settings.Settings;
|
import fr.xephi.authme.settings.Settings;
|
||||||
import fr.xephi.authme.settings.properties.PluginSettings;
|
import fr.xephi.authme.settings.properties.PluginSettings;
|
||||||
|
import fr.xephi.authme.settings.properties.SecuritySettings;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@ -51,18 +53,18 @@ public class AuthGroupHandler {
|
|||||||
switch (group) {
|
switch (group) {
|
||||||
case UNREGISTERED:
|
case UNREGISTERED:
|
||||||
// Remove the other group type groups, set the current group
|
// 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);
|
return permissionsManager.addGroup(player, Settings.unRegisteredGroup);
|
||||||
|
|
||||||
case REGISTERED:
|
case REGISTERED:
|
||||||
// Remove the other group type groups, set the current group
|
// 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);
|
return permissionsManager.addGroup(player, Settings.getRegisteredGroup);
|
||||||
|
|
||||||
case NOT_LOGGED_IN:
|
case NOT_LOGGED_IN:
|
||||||
// Remove the other group type groups, set the current group
|
// Remove the other group type groups, set the current group
|
||||||
permissionsManager.removeGroups(player, Arrays.asList(Settings.unRegisteredGroup, Settings.getRegisteredGroup));
|
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:
|
case LOGGED_IN:
|
||||||
// Get the limbo player data
|
// Get the limbo player data
|
||||||
@ -76,7 +78,7 @@ public class AuthGroupHandler {
|
|||||||
|
|
||||||
// Remove the other group types groups, set the real group
|
// Remove the other group types groups, set the real group
|
||||||
permissionsManager.removeGroups(player,
|
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);
|
return permissionsManager.addGroup(player, realGroup);
|
||||||
default:
|
default:
|
||||||
|
@ -9,7 +9,6 @@ import fr.xephi.authme.cache.limbo.LimboCache;
|
|||||||
import fr.xephi.authme.datasource.DataSource;
|
import fr.xephi.authme.datasource.DataSource;
|
||||||
import fr.xephi.authme.events.ProtectInventoryEvent;
|
import fr.xephi.authme.events.ProtectInventoryEvent;
|
||||||
import fr.xephi.authme.hooks.PluginHooks;
|
import fr.xephi.authme.hooks.PluginHooks;
|
||||||
import fr.xephi.authme.listener.protocollib.ProtocolLibService;
|
|
||||||
import fr.xephi.authme.output.MessageKey;
|
import fr.xephi.authme.output.MessageKey;
|
||||||
import fr.xephi.authme.permission.AuthGroupType;
|
import fr.xephi.authme.permission.AuthGroupType;
|
||||||
import fr.xephi.authme.permission.PlayerStatePermission;
|
import fr.xephi.authme.permission.PlayerStatePermission;
|
||||||
|
@ -3,7 +3,6 @@ package fr.xephi.authme.process.quit;
|
|||||||
import fr.xephi.authme.cache.backup.JsonCache;
|
import fr.xephi.authme.cache.backup.JsonCache;
|
||||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||||
import fr.xephi.authme.cache.limbo.LimboPlayer;
|
import fr.xephi.authme.cache.limbo.LimboPlayer;
|
||||||
import fr.xephi.authme.datasource.DataSource;
|
|
||||||
import fr.xephi.authme.process.ProcessService;
|
import fr.xephi.authme.process.ProcessService;
|
||||||
import fr.xephi.authme.process.SynchronousProcess;
|
import fr.xephi.authme.process.SynchronousProcess;
|
||||||
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
||||||
|
Loading…
Reference in New Issue
Block a user