General bug work, there's a small bug in here I can't find...grrr

This commit is contained in:
graywolf336
2013-12-28 12:53:07 -06:00
parent df0caabbac
commit b75f12c23c
3 changed files with 18 additions and 10 deletions

View File

@ -115,13 +115,18 @@ public class Cell {
* @return true if there is a chest, false if there isn't.
*/
public boolean hasChest() {
if(getChest() != null) {
if(getChest().getInventory().getSize() >= 40) return true;
else {
Chest c = getChest();
if(c != null) {
if(c.getInventory().getSize() >= 40) {
Bukkit.getLogger().info("The cell " + this.name + " has a chest.");
return true;
}else {
Bukkit.getLogger().severe("The cell " + this.name + " has chest that isn't a double chest, please fix.");
return false;
}
}else
}else {
Bukkit.getLogger().info("The cell " + this.name + " doesn't have a chest.");
return false;
}
}
}