mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-24 17:47:38 +01:00
Minor householding
- Remove getter for NewSetting - Reduce visibility of classes used by DelayedRunner
This commit is contained in:
parent
d35005167e
commit
a0abe3d19d
@ -709,14 +709,6 @@ public class AuthMe extends JavaPlugin {
|
||||
// Service getters (deprecated)
|
||||
// Use @Inject fields instead
|
||||
// -------------
|
||||
/**
|
||||
* @return NewSetting
|
||||
* @deprecated should be used in API classes only (temporarily)
|
||||
*/
|
||||
@Deprecated
|
||||
public NewSetting getSettings() {
|
||||
return newSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return permission manager
|
||||
|
@ -9,6 +9,7 @@ import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
import fr.xephi.authme.security.crypts.HashedPassword;
|
||||
import fr.xephi.authme.settings.NewSetting;
|
||||
import fr.xephi.authme.settings.properties.SecuritySettings;
|
||||
import fr.xephi.authme.util.BukkitService;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -30,6 +31,9 @@ public class BungeeCordMessage implements PluginMessageListener {
|
||||
|
||||
@Inject
|
||||
private AuthMe plugin;
|
||||
|
||||
@Inject
|
||||
private NewSetting settings;
|
||||
|
||||
BungeeCordMessage() { }
|
||||
|
||||
@ -63,17 +67,17 @@ public class BungeeCordMessage implements PluginMessageListener {
|
||||
}
|
||||
//END
|
||||
|
||||
if (!plugin.getSettings().getProperty(SecuritySettings.REMOVE_SPAM_FROM_CONSOLE)) {
|
||||
if (!settings.getProperty(SecuritySettings.REMOVE_SPAM_FROM_CONSOLE)) {
|
||||
ConsoleLogger.info("Player " + auth.getNickname() + " has logged in from one of your server!");
|
||||
}
|
||||
} else if ("logout".equals(act)) {
|
||||
playerCache.removePlayer(name);
|
||||
dataSource.setUnlogged(name);
|
||||
if (!plugin.getSettings().getProperty(SecuritySettings.REMOVE_SPAM_FROM_CONSOLE)) {
|
||||
if (!settings.getProperty(SecuritySettings.REMOVE_SPAM_FROM_CONSOLE)) {
|
||||
ConsoleLogger.info("Player " + auth.getNickname() + " has logged out from one of your server!");
|
||||
}
|
||||
} else if ("register".equals(act)) {
|
||||
if (!plugin.getSettings().getProperty(SecuritySettings.REMOVE_SPAM_FROM_CONSOLE)) {
|
||||
if (!settings.getProperty(SecuritySettings.REMOVE_SPAM_FROM_CONSOLE)) {
|
||||
ConsoleLogger.info("Player " + auth.getNickname() + " has registered out from one of your server!");
|
||||
}
|
||||
} else if ("changepassword".equals(act)) {
|
||||
|
@ -10,7 +10,7 @@ import java.lang.reflect.Method;
|
||||
/**
|
||||
* Contains all necessary information to initialize a {@link InjectDelayed} field.
|
||||
*/
|
||||
public class PendingInjection {
|
||||
class PendingInjection {
|
||||
|
||||
private Field field;
|
||||
private Object[] dependencies;
|
||||
|
@ -11,7 +11,7 @@ import java.util.List;
|
||||
* after Mockito's @Mock, @Spy and @InjectMocks have taken effect,
|
||||
* but before {@link InjectDelayed} fields are handled.
|
||||
*/
|
||||
public class RunBeforeInjectings extends Statement {
|
||||
class RunBeforeInjectings extends Statement {
|
||||
|
||||
private final Statement next;
|
||||
private final List<FrameworkMethod> beforeInjectings;
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
* Statement for initializing {@link InjectDelayed} fields. These fields are
|
||||
* constructed after {@link BeforeInjecting} and before JUnit's @Before.
|
||||
*/
|
||||
public class RunDelayedInjects extends Statement {
|
||||
class RunDelayedInjects extends Statement {
|
||||
|
||||
private final Statement next;
|
||||
private final Object target;
|
||||
|
Loading…
Reference in New Issue
Block a user