fix not editable sign after openSign

This commit is contained in:
Jake Potrebic 2023-06-08 19:45:48 -07:00
parent fed16ccbff
commit 350be363a0
3 changed files with 5 additions and 5 deletions

View file

@ -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<T extends SignBlockEntity> 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
}

View file

@ -5211,7 +5211,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+public final class PluginConfigConstraints {
+
+ public static final Set<String> RESERVED_KEYS = Set.of("bukkit", "minecraft", "mojang", "spigot", "paper");
+ public static final Set<String> VALID_PAPER_VERSIONS = Set.of("1.19");
+ public static final Set<String> VALID_PAPER_VERSIONS = Set.of("1.19", "1.20");
+
+ @Documented
+ @Retention(RetentionPolicy.RUNTIME)

View file

@ -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") {