diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0a5a11d8..1564dd71 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -169,6 +169,7 @@ public final class CraftServer implements Server { private boolean printSaveWarning; private CraftIconCache icon; private boolean overrideAllCommandBlockCommands = false; + private boolean unrestrictedAdvancements; private final Pattern validUserPattern = Pattern.compile("^[a-zA-Z0-9_]{2,16}$"); private final UUID invalidUserUUID = UUID.nameUUIDFromBytes("InvalidUsername".getBytes(Charsets.UTF_8)); private final List<CraftPlayer> playerView; @@ -247,6 +248,7 @@ public final class CraftServer implements Server { saveCommandsConfig(); overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); + unrestrictedAdvancements = commandsConfiguration.getBoolean("unrestricted-advancements"); pluginManager.useTimings(configuration.getBoolean("settings.plugin-profiling")); monsterSpawn = configuration.getInt("spawn-limits.monsters"); animalSpawn = configuration.getInt("spawn-limits.animals"); @@ -259,6 +261,10 @@ public final class CraftServer implements Server { loadIcon(); } + public boolean getPermissionOverride(ICommandListener listener) { + return unrestrictedAdvancements && listener instanceof AdvancementRewards.AdvancementCommandListener; + } + public boolean getCommandBlockOverride(String command) { return overrideAllCommandBlockCommands || commandsConfiguration.getStringList("command-block-overrides").contains(command); } |