From 350be363a03584593d03b50eaa6726534c30a301 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 8 Jun 2023 19:45:48 -0700 Subject: [PATCH] fix not editable sign after openSign --- patches/server/Add-openSign-method-to-HumanEntity.patch | 6 +++--- patches/server/Paper-Plugins.patch | 2 +- test-plugin/build.gradle.kts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/server/Add-openSign-method-to-HumanEntity.patch b/patches/server/Add-openSign-method-to-HumanEntity.patch index aec8594f5e..b0d81ea66a 100644 --- a/patches/server/Add-openSign-method-to-HumanEntity.patch +++ b/patches/server/Add-openSign-method-to-HumanEntity.patch @@ -16,13 +16,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static void openSign(Sign sign, org.bukkit.entity.HumanEntity player, Side side) { // Paper - change move open sign to HumanEntity Preconditions.checkArgument(sign != null, "sign == null"); Preconditions.checkArgument(side != null, "side == null"); -- Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed"); -+ // Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed"); // Paper - don't require placed - Preconditions.checkArgument(sign.getWorld() == player.getWorld(), "Sign must be in same world as Player"); + Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed"); +@@ -0,0 +0,0 @@ public class CraftSign extends CraftBlockEntityState< SignBlockEntity handle = ((CraftSign) sign).getTileEntity(); - ((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side); ++ handle.setAllowedPlayerEditor(player.getUniqueId()); // Paper + ((org.bukkit.craftbukkit.entity.CraftHumanEntity) player).getHandle().openTextEdit(handle, Side.FRONT == side); // Paper - change move open sign to HumanEntity } diff --git a/patches/server/Paper-Plugins.patch b/patches/server/Paper-Plugins.patch index 805f0e327a..c764cedad7 100644 --- a/patches/server/Paper-Plugins.patch +++ b/patches/server/Paper-Plugins.patch @@ -5211,7 +5211,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +public final class PluginConfigConstraints { + + public static final Set RESERVED_KEYS = Set.of("bukkit", "minecraft", "mojang", "spigot", "paper"); -+ public static final Set VALID_PAPER_VERSIONS = Set.of("1.19"); ++ public static final Set VALID_PAPER_VERSIONS = Set.of("1.19", "1.20"); + + @Documented + @Retention(RetentionPolicy.RUNTIME) diff --git a/test-plugin/build.gradle.kts b/test-plugin/build.gradle.kts index e86b933408..f280918aaa 100644 --- a/test-plugin/build.gradle.kts +++ b/test-plugin/build.gradle.kts @@ -10,7 +10,7 @@ tasks.processResources { .split(".", "-").take(2).joinToString(".") val props = mapOf( "version" to project.version, - "apiversion" to apiVersion, + "apiversion" to "\"$apiVersion\"", ) inputs.properties(props) filesMatching("paper-plugin.yml") {