Only try to jail in a cell if that jail has cells, resolves #51

This commit is contained in:
graywolf336
2015-02-16 15:00:14 -06:00
parent 7e2df93add
commit 0d9ed022f3
2 changed files with 13 additions and 1 deletions

View File

@ -153,6 +153,11 @@ public class Jail {
public void removePrisoner(Prisoner p) {
this.nocellPrisoners.remove(p.getUUID());
}
/** Returns if there are any cells or not. */
public boolean hasCells() {
return !this.cells.isEmpty();
}
/** Adds a cell to the Jail. */
public void addCell(Cell cell, boolean save) {