Fixed double chests

This commit is contained in:
boy0001 2015-02-12 14:27:08 +11:00
parent 1c66c985d5
commit af76347a46

View File

@ -30,6 +30,8 @@ import org.bukkit.block.Sign;
import org.bukkit.block.Skull; import org.bukkit.block.Skull;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
@ -437,8 +439,8 @@ public class ChunkManager {
switch (id) { switch (id) {
case 54: case 54:
bl = new BlockLoc(x, y, z); bl = new BlockLoc(x, y, z);
Chest chest = (Chest) block.getState(); InventoryHolder chest = (InventoryHolder) block.getState();
ItemStack[] inventory = chest.getBlockInventory().getContents().clone(); ItemStack[] inventory = chest.getInventory().getContents().clone();
chestContents.put(bl, inventory); chestContents.put(bl, inventory);
break; break;
case 52: case 52: