mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-16 23:55:17 +01:00
SPIGOT-6094: Error loading datapack functions
This commit is contained in:
parent
8b52a7666e
commit
50da2cdec3
@ -16,11 +16,12 @@
|
||||
|
||||
public CommandListenerWrapper(ICommandListener icommandlistener, Vec3D vec3d, Vec2F vec2f, WorldServer worldserver, int i, String s, IChatBaseComponent ichatbasecomponent, MinecraftServer minecraftserver, @Nullable Entity entity) {
|
||||
this(icommandlistener, vec3d, vec2f, worldserver, i, s, ichatbasecomponent, minecraftserver, entity, false, (commandcontext, flag, j) -> {
|
||||
@@ -128,9 +130,22 @@
|
||||
@@ -128,9 +130,23 @@
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(int i) {
|
||||
+ // CraftBukkit start
|
||||
+ CommandNode currentCommand = this.currentCommand;
|
||||
+ if (currentCommand != null) {
|
||||
+ return hasPermission(i, org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
|
||||
+ }
|
||||
@ -39,7 +40,7 @@
|
||||
public Vec3D getPosition() {
|
||||
return this.d;
|
||||
}
|
||||
@@ -192,7 +207,7 @@
|
||||
@@ -192,7 +208,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||||
|
||||
@ -48,7 +49,7 @@
|
||||
entityplayer.sendMessage(ichatmutablecomponent, SystemUtils.b);
|
||||
}
|
||||
}
|
||||
@@ -252,4 +267,10 @@
|
||||
@@ -252,4 +268,10 @@
|
||||
public IRegistryCustom q() {
|
||||
return this.i.aX();
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
|
||||
return modifier;
|
||||
}
|
||||
|
||||
public boolean canUse(final S source) {
|
||||
// CraftBukkit start
|
||||
// CraftBukkit start
|
||||
public synchronized boolean canUse(final S source) {
|
||||
if (source instanceof CommandListenerWrapper) {
|
||||
try {
|
||||
((CommandListenerWrapper) source).currentCommand = this;
|
||||
|
Loading…
Reference in New Issue
Block a user