First attempt to use UUID, not tested one ounce.

And I imagine the unit tests are going to fail.
This commit is contained in:
graywolf336
2014-04-21 22:58:15 -05:00
parent 1de176e67e
commit a3d9a54ff0
9 changed files with 109 additions and 81 deletions

View File

@ -164,10 +164,17 @@ public class JailCommand implements Command {
return true;
}
String uuid = "";
if(p == null) {
uuid = jm.getPlugin().getServer().getOfflinePlayer(params.getPlayer()).getUniqueId().toString();
}else {
uuid = p.getUniqueId().toString();
}
//Get the jail instance from the name of jail in the params.
Jail j = jm.getJail(jailName);
Cell c = j.getCell(params.getCell());
Prisoner pris = new Prisoner(params.getPlayer(), muted, time, sender.getName(), reason);
Prisoner pris = new Prisoner(uuid, params.getPlayer(), muted, time, sender.getName(), reason);
//call the event
PrePrisonerJailedEvent event = new PrePrisonerJailedEvent(j, c, pris, p, p == null, pris.getJailer());