mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 19:22:50 +01:00
SPIGOT-4044: Cannot load datapack functions on startup
This commit is contained in:
parent
40f15832b4
commit
80f4c10c8f
1 changed files with 4 additions and 3 deletions
|
@ -20,20 +20,21 @@
|
|||
}, ArgumentAnchor.Anchor.FEET);
|
||||
}
|
||||
|
||||
@@ -119,6 +121,12 @@
|
||||
@@ -119,6 +121,13 @@
|
||||
}
|
||||
|
||||
public boolean hasPermission(int i) {
|
||||
+ // CraftBukkit start
|
||||
+ if (currentCommand != null) {
|
||||
+ return (!getWorld().getServer().ignoreVanillaPermissions && this.f >= i) || getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
|
||||
+ // World is null when loading functions
|
||||
+ return ((getWorld() == null || !getWorld().getServer().ignoreVanillaPermissions) && this.f >= i) || getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
return this.f >= i;
|
||||
}
|
||||
|
||||
@@ -232,4 +240,10 @@
|
||||
@@ -232,4 +241,10 @@
|
||||
public Collection<ICompletionProvider.a> a(boolean flag) {
|
||||
return Collections.singleton(ICompletionProvider.a.b);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue