3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Fix sign lazy initialisation

Fixes PaperMC/Paper#4975
Dieser Commit ist enthalten in:
Mariell Hoversholm 2021-01-01 14:35:38 +01:00 committet von Mariell
Ursprung 9f61759d90
Commit f1317386dc

Datei anzeigen

@ -130,23 +130,6 @@ index 26cc40e57f5b73b9c32859bff37c4a3d94904c56..feeae1a9eb309ae4101783b191bb2bff
}
private T createSnapshot(T tileEntity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index 81f6bf5533288ed90e2f1f4d421d54195d9650c7..4a266b95afea5c3853774752f94e287234fa5726 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -18,10 +18,12 @@ public class CraftSign extends CraftBlockEntityState<TileEntitySign> implements
public CraftSign(final Block block) {
super(block, TileEntitySign.class);
+ if (lines == null) { lines = new String[]{"", "", "", ""}; } // Paper
}
public CraftSign(final Material material, final TileEntitySign te) {
super(material, te);
+ if (lines == null) { lines = new String[]{"", "", "", ""}; } // Paper
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
index 58e2db5da178af6a8c30f563353fefe720ff9781..b704f550de290e0bc1235bf7e68c7eb347162c69 100644
--- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java