mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
Add ignore-vanilla-permissions option to assist with disabling default commands
This commit is contained in:
parent
322f2f9518
commit
8fbc72b714
@ -26,7 +26,7 @@
|
|||||||
public boolean hasPermission(int i) {
|
public boolean hasPermission(int i) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (currentCommand != null) {
|
+ if (currentCommand != null) {
|
||||||
+ return this.f >= i || getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
|
+ return (!getWorld().getServer().ignoreVanillaPermissions && this.f >= i) || getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+
|
+
|
||||||
|
@ -185,6 +185,7 @@ public final class CraftServer implements Server {
|
|||||||
private boolean printSaveWarning;
|
private boolean printSaveWarning;
|
||||||
private CraftIconCache icon;
|
private CraftIconCache icon;
|
||||||
private boolean overrideAllCommandBlockCommands = false;
|
private boolean overrideAllCommandBlockCommands = false;
|
||||||
|
public boolean ignoreVanillaPermissions = false;
|
||||||
private final List<CraftPlayer> playerView;
|
private final List<CraftPlayer> playerView;
|
||||||
public int reloadCount;
|
public int reloadCount;
|
||||||
|
|
||||||
@ -261,6 +262,7 @@ public final class CraftServer implements Server {
|
|||||||
|
|
||||||
saveCommandsConfig();
|
saveCommandsConfig();
|
||||||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||||
|
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||||
pluginManager.useTimings(configuration.getBoolean("settings.plugin-profiling"));
|
pluginManager.useTimings(configuration.getBoolean("settings.plugin-profiling"));
|
||||||
monsterSpawn = configuration.getInt("spawn-limits.monsters");
|
monsterSpawn = configuration.getInt("spawn-limits.monsters");
|
||||||
animalSpawn = configuration.getInt("spawn-limits.animals");
|
animalSpawn = configuration.getInt("spawn-limits.animals");
|
||||||
@ -741,6 +743,7 @@ public final class CraftServer implements Server {
|
|||||||
resetRecipes();
|
resetRecipes();
|
||||||
reloadData();
|
reloadData();
|
||||||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||||
|
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||||
|
|
||||||
int pollCount = 0;
|
int pollCount = 0;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
# Bug tracker: http://www.spigotmc.org/go/bugs
|
# Bug tracker: http://www.spigotmc.org/go/bugs
|
||||||
|
|
||||||
command-block-overrides: []
|
command-block-overrides: []
|
||||||
unrestricted-advancements: false
|
ignore-vanilla-permissions: false
|
||||||
aliases:
|
aliases:
|
||||||
icanhasbukkit:
|
icanhasbukkit:
|
||||||
- "version $1-"
|
- "version $1-"
|
||||||
|
Loading…
Reference in New Issue
Block a user