Fix EntityArgument and EntitySelectorParser permissions to align with EntitySelector#checkPermissions
Fixes where the user has permission for selectors but not their suggestions, which especially matters when we force suggestions to the server for this type
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
--- a/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||
+++ b/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||
@@ -133,7 +133,7 @@
|
||||
boolean flag;
|
||||
|
||||
if (source instanceof SharedSuggestionProvider icompletionprovider) {
|
||||
- if (icompletionprovider.hasPermission(2)) {
|
||||
+ if (source instanceof net.minecraft.commands.CommandSourceStack stack ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") : icompletionprovider.hasPermission(2)) { // Paper - Fix EntityArgument permissions
|
||||
flag = true;
|
||||
return flag;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user