Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-6094: Error loading datapack functions
Dieser Commit ist enthalten in:
Ursprung
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) {
|
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) -> {
|
this(icommandlistener, vec3d, vec2f, worldserver, i, s, ichatbasecomponent, minecraftserver, entity, false, (commandcontext, flag, j) -> {
|
||||||
@@ -128,9 +130,22 @@
|
@@ -128,9 +130,23 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(int i) {
|
public boolean hasPermission(int i) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
|
+ CommandNode currentCommand = this.currentCommand;
|
||||||
+ if (currentCommand != null) {
|
+ if (currentCommand != null) {
|
||||||
+ return hasPermission(i, org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
|
+ return hasPermission(i, org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
|
||||||
+ }
|
+ }
|
||||||
@ -39,7 +40,7 @@
|
|||||||
public Vec3D getPosition() {
|
public Vec3D getPosition() {
|
||||||
return this.d;
|
return this.d;
|
||||||
}
|
}
|
||||||
@@ -192,7 +207,7 @@
|
@@ -192,7 +208,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||||||
|
|
||||||
@ -48,7 +49,7 @@
|
|||||||
entityplayer.sendMessage(ichatmutablecomponent, SystemUtils.b);
|
entityplayer.sendMessage(ichatmutablecomponent, SystemUtils.b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -252,4 +267,10 @@
|
@@ -252,4 +268,10 @@
|
||||||
public IRegistryCustom q() {
|
public IRegistryCustom q() {
|
||||||
return this.i.aX();
|
return this.i.aX();
|
||||||
}
|
}
|
||||||
|
@ -71,8 +71,8 @@ public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
|
|||||||
return modifier;
|
return modifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canUse(final S source) {
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
public synchronized boolean canUse(final S source) {
|
||||||
if (source instanceof CommandListenerWrapper) {
|
if (source instanceof CommandListenerWrapper) {
|
||||||
try {
|
try {
|
||||||
((CommandListenerWrapper) source).currentCommand = this;
|
((CommandListenerWrapper) source).currentCommand = this;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren