2019-01-31 05:08:25 +01:00
|
|
|
--- a/net/minecraft/server/ArgumentParserSelector.java
|
|
|
|
+++ b/net/minecraft/server/ArgumentParserSelector.java
|
2019-02-01 23:57:26 +01:00
|
|
|
@@ -97,9 +97,23 @@
|
|
|
|
this(stringreader, true);
|
2019-01-31 05:08:25 +01:00
|
|
|
}
|
|
|
|
|
2019-02-01 23:57:26 +01:00
|
|
|
+ // CraftBukkit start - decompile error
|
|
|
|
+ private static final CriterionConditionValue.c DEFAULT_q;
|
|
|
|
+ private static final CriterionConditionValue.d DEFAULT_r;
|
|
|
|
+
|
|
|
|
+ static {
|
2019-01-31 05:08:25 +01:00
|
|
|
+ try {
|
2019-02-01 23:57:26 +01:00
|
|
|
+ DEFAULT_q = (CriterionConditionValue.c) Class.forName("net.minecraft.server.CriterionConditionValue$c").getDeclaredField("e").get(null);
|
|
|
|
+ DEFAULT_r = (CriterionConditionValue.d) Class.forName("net.minecraft.server.CriterionConditionValue$d").getDeclaredField("e").get(null);
|
2019-01-31 05:08:25 +01:00
|
|
|
+ } catch (Exception ex) {
|
|
|
|
+ throw new AssertionError(ex);
|
|
|
|
+ }
|
2019-02-01 23:57:26 +01:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public ArgumentParserSelector(StringReader stringreader, boolean flag) {
|
|
|
|
- this.q = CriterionConditionValue.c.e;
|
|
|
|
- this.r = CriterionConditionValue.d.e;
|
|
|
|
+ this.q = DEFAULT_q;
|
|
|
|
+ this.r = DEFAULT_r;
|
2019-01-31 05:08:25 +01:00
|
|
|
+ // CraftBukkit end
|
|
|
|
this.y = CriterionConditionRange.a;
|
|
|
|
this.z = CriterionConditionRange.a;
|
|
|
|
this.A = (entity) -> {
|
2019-02-01 23:57:26 +01:00
|
|
|
@@ -126,7 +140,7 @@
|
2019-01-31 05:08:25 +01:00
|
|
|
axisalignedbb = this.a(this.v == null ? 0.0D : this.v, this.w == null ? 0.0D : this.w, this.x == null ? 0.0D : this.x);
|
|
|
|
}
|
|
|
|
|
|
|
|
- Function function;
|
|
|
|
+ Function<Vec3D, Vec3D> function; // CraftBukkit - decompile error
|
|
|
|
|
|
|
|
if (this.s == null && this.t == null && this.u == null) {
|
|
|
|
function = (vec3d) -> {
|
2019-02-01 23:57:26 +01:00
|
|
|
@@ -187,8 +201,10 @@
|
2019-01-31 05:08:25 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
- protected void b() throws CommandSyntaxException {
|
|
|
|
- this.T = true;
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ protected void b(boolean overridePermissions) throws CommandSyntaxException {
|
|
|
|
+ this.T = !overridePermissions;
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.G = this::d;
|
|
|
|
if (!this.l.canRead()) {
|
|
|
|
throw ArgumentParserSelector.d.createWithContext(this.l);
|
2019-02-01 23:57:26 +01:00
|
|
|
@@ -431,6 +447,12 @@
|
2019-01-31 05:08:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public EntitySelector s() throws CommandSyntaxException {
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ return s(false);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public EntitySelector s(boolean overridePermissions) throws CommandSyntaxException {
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.E = this.l.getCursor();
|
|
|
|
this.G = this::b;
|
|
|
|
if (this.l.canRead() && this.l.peek() == '@') {
|
2019-02-01 23:57:26 +01:00
|
|
|
@@ -439,7 +461,7 @@
|
2019-01-31 05:08:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
this.l.skip();
|
|
|
|
- this.b();
|
|
|
|
+ this.b(overridePermissions); // CraftBukkit
|
|
|
|
} else {
|
|
|
|
this.c();
|
|
|
|
}
|