From af76347a4604a4dc3063a0fd22256861d645cb42 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Thu, 12 Feb 2015 14:27:08 +1100 Subject: [PATCH] Fixed double chests --- .../com/intellectualcrafters/plot/util/ChunkManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java index 2b51ee7f8..21912a2c8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/ChunkManager.java @@ -30,6 +30,8 @@ import org.bukkit.block.Sign; import org.bukkit.block.Skull; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; @@ -437,8 +439,8 @@ public class ChunkManager { switch (id) { case 54: bl = new BlockLoc(x, y, z); - Chest chest = (Chest) block.getState(); - ItemStack[] inventory = chest.getBlockInventory().getContents().clone(); + InventoryHolder chest = (InventoryHolder) block.getState(); + ItemStack[] inventory = chest.getInventory().getContents().clone(); chestContents.put(bl, inventory); break; case 52: