mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
fix not editable sign after openSign
This commit is contained in:
parent
ccb194bbbb
commit
03c3587e2e
@ -5188,7 +5188,7 @@ index 0000000000000000000000000000000000000000..d1088e4b7fa5f8e689f23b150b83645c
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/serializer/constraints/PluginConfigConstraints.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/serializer/constraints/PluginConfigConstraints.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a0109a388188b0808900405d334a40318ab16ec1
|
||||
index 0000000000000000000000000000000000000000..2e02f73b857c530a0cce3a8d6aae46e3b0966486
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/provider/configuration/serializer/constraints/PluginConfigConstraints.java
|
||||
@@ -0,0 +1,86 @@
|
||||
@ -5211,7 +5211,7 @@ index 0000000000000000000000000000000000000000..a0109a388188b0808900405d334a4031
|
||||
+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)
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
index cc6aab5341365f9b4ec3cb23e2a4f5006aa75cd7..79d65cd38fea160cf8c3b4b8c32bb62740f18c9a 100644
|
||||
index cc6aab5341365f9b4ec3cb23e2a4f5006aa75cd7..78b57aa3120f8526b4bff2ca90d7735845a87b41 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
|
||||
@@ -110,15 +110,15 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
|
||||
@@ -110,7 +110,7 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
|
||||
super.applyTo(sign);
|
||||
}
|
||||
|
||||
@ -16,13 +16,13 @@ index cc6aab5341365f9b4ec3cb23e2a4f5006aa75cd7..79d65cd38fea160cf8c3b4b8c32bb627
|
||||
+ 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");
|
||||
@@ -118,7 +118,8 @@ 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
|
||||
}
|
||||
|
||||
|
@ -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") {
|
||||
|
Loading…
Reference in New Issue
Block a user