Fix inventory not being stored in chests of a cell

This commit is contained in:
graywolf336 2015-06-12 23:09:08 -05:00
parent e77cda996e
commit 45a0c79bdd

View File

@ -201,7 +201,9 @@ public class Cell implements ICell {
public Chest getChest() {
if(this.chest == null) return null;
if(this.chest.getLocation().getBlock() == null || this.chest.getLocation().getBlock().getType() != Material.CHEST) return null;
if(this.chest.getLocation().getBlock() == null
|| (this.chest.getLocation().getBlock().getType() != Material.CHEST
&& this.chest.getLocation().getBlock().getType() != Material.TRAPPED_CHEST)) return null;
return (Chest) this.chest.getLocation().getBlock().getState();
}