diff options
author | Lukas Hennig <lukas@wirsindwir.de> | 2017-08-07 03:30:41 +0200 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-08-07 17:55:47 +1000 |
commit | e1f296d115cfd2c517413d122990033fc1eda78d (patch) | |
tree | 196f0c96782f5964cf9fabd0217eb750852b63d2 /src/main/java | |
parent | b5878783ad27ea17421faee92bb9a43b3ef8ef37 (diff) | |
download | craftbukkit-e1f296d115cfd2c517413d122990033fc1eda78d.tar craftbukkit-e1f296d115cfd2c517413d122990033fc1eda78d.tar.gz craftbukkit-e1f296d115cfd2c517413d122990033fc1eda78d.tar.lz craftbukkit-e1f296d115cfd2c517413d122990033fc1eda78d.tar.xz craftbukkit-e1f296d115cfd2c517413d122990033fc1eda78d.zip |
Fix CraftBanner initialisation.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java | 3 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java index f374385e..e2c9a9b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java @@ -16,7 +16,7 @@ import org.bukkit.block.banner.PatternType; public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> implements Banner { private DyeColor base; - private List<Pattern> patterns = new ArrayList<Pattern>(); + private List<Pattern> patterns; public CraftBanner(final Block block) { super(block, TileEntityBanner.class); @@ -31,6 +31,7 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme super.load(banner); base = DyeColor.getByDyeData((byte) banner.color.getInvColorIndex()); + patterns = new ArrayList<Pattern>(); if (banner.patterns != null) { for (int i = 0; i < banner.patterns.size(); i++) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java index cf94c062..8328ed00 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -84,7 +84,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState return snapshot.save(new NBTTagCompound()); } - // copies the data of the given tile entity data to this block state + // copies the data of the given tile entity to this block state protected void load(T tileEntity) { if (tileEntity != null && tileEntity != snapshot) { copyData(tileEntity, snapshot); |