diff options
author | Riley Park <[email protected]> | 2024-05-15 17:06:59 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-15 17:06:59 -0700 |
commit | f17519338bc589c045e0b32bfc37e048b23544d5 (patch) | |
tree | e50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/server/0779-Fix-EntityArgument-suggestion-permissions-to-align-w.patch | |
parent | 3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff) | |
download | Paper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip |
Expose server build information (#10729)
* Expose server build information
* squash patches
* final tweaks
---------
Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/server/0779-Fix-EntityArgument-suggestion-permissions-to-align-w.patch')
-rw-r--r-- | patches/server/0779-Fix-EntityArgument-suggestion-permissions-to-align-w.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/patches/server/0779-Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/0779-Fix-EntityArgument-suggestion-permissions-to-align-w.patch new file mode 100644 index 0000000000..c42422ceca --- /dev/null +++ b/patches/server/0779-Fix-EntityArgument-suggestion-permissions-to-align-w.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jason Penilla <[email protected]> +Date: Wed, 26 Oct 2022 13:13:12 -0700 +Subject: [PATCH] Fix EntityArgument suggestion 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 + +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 +--- 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> { + StringReader stringreader = new StringReader(suggestionsbuilder.getInput()); + + stringreader.setCursor(suggestionsbuilder.getStart()); +- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2)); ++ // 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 argumentparserselector = new EntitySelectorParser(stringreader, permission); ++ // Paper end - Fix EntityArgument suggestion permissions + + try { + argumentparserselector.parse(); |