diff options
Diffstat (limited to 'patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch')
-rw-r--r-- | patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch index c42422ceca..b285d037c7 100644 --- a/patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch +++ b/patches/server/0765-Fix-EntityArgument-suggestion-permissions-to-align-w.patch @@ -9,18 +9,18 @@ suggestions, which especially matters when we force suggestions to the server for this type diff --git a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -index 78eca3243a276260ff26c3587fb60e17e0439af0..2043001c16b3530c2d3f52efda10bcad424881c0 100644 +index b6c9c230bdc8ae90ece1c3e512682c02f0e414ea..4edb23c5f08ad742bc63fda9d73d1e234482e982 100644 --- a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -@@ -127,7 +127,12 @@ public class EntityArgument implements ArgumentType<EntitySelector> { +@@ -135,7 +135,12 @@ public class EntityArgument implements ArgumentType<EntitySelector> { StringReader stringreader = new StringReader(suggestionsbuilder.getInput()); stringreader.setCursor(suggestionsbuilder.getStart()); -- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2)); +- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, EntitySelectorParser.allowSelectors(icompletionprovider)); + // Paper start - Fix EntityArgument suggestion permissions + final boolean permission = object instanceof CommandSourceStack stack + ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") -+ : icompletionprovider.hasPermission(2); ++ : EntitySelectorParser.allowSelectors(icompletionprovider); + EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, permission); + // Paper end - Fix EntityArgument suggestion permissions |