mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-25 02:27:33 +01:00
Don't spam startup logs for PermissionsHandler
This commit is contained in:
parent
d0a7c5a0ec
commit
0001665ece
@ -15,6 +15,8 @@ public class PermissionsHandler implements IPermissionsHandler {
|
||||
private final transient Essentials ess;
|
||||
private transient boolean useSuperperms = false;
|
||||
|
||||
private Class<?> lastHandler = null;
|
||||
|
||||
public PermissionsHandler(final Essentials plugin, final boolean useSuperperms) {
|
||||
this.ess = plugin;
|
||||
this.useSuperperms = useSuperperms;
|
||||
@ -113,6 +115,14 @@ public class PermissionsHandler implements IPermissionsHandler {
|
||||
if (useSuperperms && handler instanceof ConfigPermissionsHandler) {
|
||||
handler = new SuperpermsHandler();
|
||||
}
|
||||
|
||||
// don't spam logs
|
||||
Class<?> handlerClass = handler.getClass();
|
||||
if (lastHandler != null && lastHandler.equals(handlerClass)) {
|
||||
return;
|
||||
}
|
||||
lastHandler = handlerClass;
|
||||
|
||||
// output handler info
|
||||
if (handler instanceof GenericVaultHandler) {
|
||||
String enabledPermsPlugin = ((GenericVaultHandler) handler).getEnabledPermsPlugin();
|
||||
|
Loading…
Reference in New Issue
Block a user