mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-25 06:56:14 +00:00
47 lines
1.8 KiB
Diff
47 lines
1.8 KiB
Diff
--- a/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
|
|
+++ b/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
|
|
@@ -158,7 +158,7 @@
|
|
axisalignedbb = this.createAabb(this.deltaX == null ? 0.0D : this.deltaX, this.deltaY == null ? 0.0D : this.deltaY, this.deltaZ == null ? 0.0D : this.deltaZ);
|
|
}
|
|
|
|
- Function function;
|
|
+ Function<Vec3D, Vec3D> function; // CraftBukkit - decompile error
|
|
|
|
if (this.x == null && this.y == null && this.z == null) {
|
|
function = (vec3d) -> {
|
|
@@ -215,8 +215,10 @@
|
|
};
|
|
}
|
|
|
|
- protected void parseSelector() throws CommandSyntaxException {
|
|
- this.usesSelectors = true;
|
|
+ // CraftBukkit start
|
|
+ protected void parseSelector(boolean overridePermissions) throws CommandSyntaxException {
|
|
+ this.usesSelectors = !overridePermissions;
|
|
+ // CraftBukkit end
|
|
this.suggestions = this::suggestSelector;
|
|
if (!this.reader.canRead()) {
|
|
throw ArgumentParserSelector.ERROR_MISSING_SELECTOR_TYPE.createWithContext(this.reader);
|
|
@@ -505,6 +507,12 @@
|
|
}
|
|
|
|
public EntitySelector parse() throws CommandSyntaxException {
|
|
+ // CraftBukkit start
|
|
+ return parse(false);
|
|
+ }
|
|
+
|
|
+ public EntitySelector parse(boolean overridePermissions) throws CommandSyntaxException {
|
|
+ // CraftBukkit end
|
|
this.startPosition = this.reader.getCursor();
|
|
this.suggestions = this::suggestNameOrSelector;
|
|
if (this.reader.canRead() && this.reader.peek() == '@') {
|
|
@@ -513,7 +521,7 @@
|
|
}
|
|
|
|
this.reader.skip();
|
|
- this.parseSelector();
|
|
+ this.parseSelector(overridePermissions); // CraftBukkit
|
|
} else {
|
|
this.parseNameOrUUID();
|
|
}
|