geforkt von Mirrors/Paper
2873869bb1
Signs no longer have a specific isEdiable state, the entire API in this regard needs updating/deprecation. The boolean field is completely gone, replaced by a uuid (which will need a new setEditingPlayer(UUID) method on the Sign interface), and the current upstream implementation of setEdiable simply flips the is_waxed state. This patch is hence not needed as it neither allows editing (which will be redone in a later patch) nor is required to copy the is_waxed boolean flag as it lives in the signs compound tag and is covered by applyTo.
29 Zeilen
1.7 KiB
Diff
29 Zeilen
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
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 a2ea64b7ec5f47224312a1e08dd64347be6f7c43..b3c65f6b757c9ca7d26f5e95293c6021ab771a2f 100644
|
|
--- a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java
|
|
+++ b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java
|
|
@@ -128,7 +128,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), true); // Paper
|
|
+ // Paper start
|
|
+ final boolean permission = object instanceof CommandSourceStack stack
|
|
+ ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector")
|
|
+ : icompletionprovider.hasPermission(2);
|
|
+ EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, permission, true); // Paper
|
|
+ // Paper end
|
|
|
|
try {
|
|
argumentparserselector.parse();
|