mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 16:12:18 -07:00
@@ -1,28 +1,28 @@
|
||||
--- a/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
|
||||
+++ b/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
|
||||
@@ -137,7 +137,7 @@
|
||||
axisalignedbb = this.a(this.v == null ? 0.0D : this.v, this.w == null ? 0.0D : this.w, this.x == null ? 0.0D : this.x);
|
||||
@@ -149,7 +149,7 @@
|
||||
axisalignedbb = this.a(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.s == null && this.t == null && this.u == null) {
|
||||
if (this.x == null && this.y == null && this.z == null) {
|
||||
function = (vec3d) -> {
|
||||
@@ -198,8 +198,10 @@
|
||||
@@ -206,8 +206,10 @@
|
||||
};
|
||||
}
|
||||
|
||||
- protected void parseSelector() throws CommandSyntaxException {
|
||||
- this.checkPermissions = true;
|
||||
- this.usesSelectors = true;
|
||||
+ // CraftBukkit start
|
||||
+ protected void parseSelector(boolean overridePermissions) throws CommandSyntaxException {
|
||||
+ this.checkPermissions = !overridePermissions;
|
||||
+ this.usesSelectors = !overridePermissions;
|
||||
+ // CraftBukkit end
|
||||
this.G = this::d;
|
||||
if (!this.l.canRead()) {
|
||||
throw ArgumentParserSelector.d.createWithContext(this.l);
|
||||
@@ -453,6 +455,12 @@
|
||||
this.suggestions = this::d;
|
||||
if (!this.reader.canRead()) {
|
||||
throw ArgumentParserSelector.ERROR_MISSING_SELECTOR_TYPE.createWithContext(this.reader);
|
||||
@@ -465,6 +467,12 @@
|
||||
}
|
||||
|
||||
public EntitySelector parse() throws CommandSyntaxException {
|
||||
@@ -32,13 +32,13 @@
|
||||
+
|
||||
+ public EntitySelector parse(boolean overridePermissions) throws CommandSyntaxException {
|
||||
+ // CraftBukkit end
|
||||
this.E = this.l.getCursor();
|
||||
this.G = this::b;
|
||||
if (this.l.canRead() && this.l.peek() == '@') {
|
||||
@@ -461,7 +469,7 @@
|
||||
this.startPosition = this.reader.getCursor();
|
||||
this.suggestions = this::b;
|
||||
if (this.reader.canRead() && this.reader.peek() == '@') {
|
||||
@@ -473,7 +481,7 @@
|
||||
}
|
||||
|
||||
this.l.skip();
|
||||
this.reader.skip();
|
||||
- this.parseSelector();
|
||||
+ this.parseSelector(overridePermissions); // CraftBukkit
|
||||
} else {
|
||||
|
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/commands/arguments/selector/EntitySelector.java
|
||||
+++ b/net/minecraft/commands/arguments/selector/EntitySelector.java
|
||||
@@ -75,7 +75,7 @@
|
||||
@@ -90,7 +90,7 @@
|
||||
}
|
||||
|
||||
private void e(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException {
|
||||
- if (this.checkPermissions && !commandlistenerwrapper.hasPermission(2)) {
|
||||
+ if (this.checkPermissions && !commandlistenerwrapper.hasPermission(2, "minecraft.command.selector")) { // CraftBukkit
|
||||
throw ArgumentEntity.f.create();
|
||||
- if (this.usesSelector && !commandlistenerwrapper.hasPermission(2)) {
|
||||
+ if (this.usesSelector && !commandlistenerwrapper.hasPermission(2, "minecraft.command.selector")) { // CraftBukkit
|
||||
throw ArgumentEntity.ERROR_SELECTORS_NOT_ALLOWED.create();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user