mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-12 15:07:22 +01:00
Fix bad load order
This commit is contained in:
parent
e8b6f7a8e6
commit
d14fb65959
@ -14,6 +14,7 @@ import me.libraryaddict.disguise.utilities.packets.PacketsManager;
|
||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParseException;
|
||||
import me.libraryaddict.disguise.utilities.parser.DisguiseParser;
|
||||
import me.libraryaddict.disguise.utilities.parser.DisguisePerm;
|
||||
import me.libraryaddict.disguise.utilities.parser.DisguisePermissions;
|
||||
import me.libraryaddict.disguise.utilities.reflection.NmsVersion;
|
||||
import me.libraryaddict.disguise.utilities.reflection.ReflectionManager;
|
||||
import me.libraryaddict.disguise.utilities.translations.LibsMsg;
|
||||
@ -969,6 +970,8 @@ public class DisguiseConfig {
|
||||
}
|
||||
|
||||
DisguiseUtilities.getLogger().info("Loaded " + customDisguises.size() + " custom disguise" + (customDisguises.size() == 1 ? "" : "s"));
|
||||
// Reload the permissions here because otherwise our cached permissions doesn't know about the custom disguises
|
||||
DisguisePermissions.onReload();
|
||||
}
|
||||
|
||||
public static void addCustomDisguise(String disguiseName, String toParse) throws DisguiseParseException {
|
||||
|
@ -125,7 +125,7 @@ public class DisguisePermissions {
|
||||
|
||||
public static DisguisePermissions getPermissions(Permissible permissionHolder, String commandName) {
|
||||
if (permissionHolder == Bukkit.getConsoleSender() && CONSOLE_PERMISSIONS.containsKey(commandName)) {
|
||||
// return CONSOLE_PERMISSIONS.get(commandName);
|
||||
return CONSOLE_PERMISSIONS.get(commandName);
|
||||
}
|
||||
|
||||
return new DisguisePermissions(permissionHolder, commandName);
|
||||
@ -539,10 +539,6 @@ public class DisguisePermissions {
|
||||
}
|
||||
|
||||
public boolean isAllowedDisguise(DisguisePerm disguisePerm) {
|
||||
if (this == Bukkit.getConsoleSender()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return getStorage(disguisePerm) != null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user