Readd the method I removed and also change the cells to uuid.

This commit is contained in:
graywolf336
2014-04-29 10:53:36 -05:00
parent 63e117ac72
commit ad9c70cbbf
5 changed files with 22 additions and 12 deletions

View File

@ -184,10 +184,10 @@ public class Jail {
}
/** Returns the cell which the given player name is jailed in, null if not. */
public Cell getCellPrisonerIsIn(String name) {
public Cell getCellPrisonerIsIn(UUID uuid) {
for(Cell c : cells.values())
if(c.getPrisoner() != null)
if(c.getPrisoner().getName().equalsIgnoreCase(name))
if(c.hasPrisoner())
if(c.getPrisoner().getUUID().equals(uuid))
return c;
return null;