General bug work, there's a small bug in here I can't find...grrr
This commit is contained in:
parent
df0caabbac
commit
b75f12c23c
@ -71,7 +71,7 @@ public class PrisonerManager {
|
||||
//Get a message ready for broadcasting or logging.
|
||||
String msg = "";
|
||||
|
||||
if(prisoner.getRemainingTime() < 0)
|
||||
if(prisoner.getRemainingTime() < 0L)
|
||||
msg = pl.getJailIO().getLanguageString(LangString.BROADCASTMESSAGEFOREVER, new String[] { prisoner.getName() });
|
||||
else//
|
||||
msg = pl.getJailIO().getLanguageString(LangString.BROADCASTMESSAGEFOREVER, new String[] { prisoner.getName(), String.valueOf(prisoner.getRemainingTimeInMinutes()) });
|
||||
@ -213,6 +213,9 @@ public class PrisonerManager {
|
||||
String[] inv = Util.playerInventoryToBase64(player.getInventory());
|
||||
prisoner.setInventory(inv[0]);
|
||||
prisoner.setArmor(inv[1]);
|
||||
|
||||
player.getInventory().setArmorContents(null);
|
||||
player.getInventory().clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class CellCreationSteps {
|
||||
|
||||
/** Sends the Cell Creation message for starting out. */
|
||||
public void startStepping(Player player){
|
||||
player.sendMessage(ChatColor.AQUA + "---------- Jail Cell Creation ----------");
|
||||
player.sendMessage(ChatColor.AQUA + "---------- Jail Cell Creation (tp) ----------");
|
||||
player.sendMessage(ChatColor.GREEN + "First, you must select a teleport point for the cell! Move to the teleport point and then click anywhere with your wooden sword to set it.");
|
||||
player.sendMessage(ChatColor.AQUA + "----------------------------------------");
|
||||
|
||||
@ -75,14 +75,14 @@ public class CellCreationSteps {
|
||||
Vector point = player.getLocation().toVector().clone();
|
||||
|
||||
if(Util.isInsideAB(point, v1, v2)) {
|
||||
player.sendMessage(ChatColor.AQUA + "---------- Jail Cell Creation ----------");
|
||||
player.sendMessage(ChatColor.AQUA + "---------- Jail Cell Creation (signs) ----------");
|
||||
player.sendMessage(ChatColor.GREEN + "Teleport point selected. Now select signs associated with this cell. You may select multiple signs. After you are done with the sign selection, right click on any non-sign block.");
|
||||
player.sendMessage(ChatColor.AQUA + "----------------------------------------");
|
||||
|
||||
cp.setTeleportIn(player.getLocation());
|
||||
cp.nextStep();
|
||||
}else {
|
||||
player.sendMessage(ChatColor.RED + "---------- Jail Cell Creation ----------");
|
||||
player.sendMessage(ChatColor.RED + "---------- Jail Cell Creation (tp) ----------");
|
||||
player.sendMessage(ChatColor.RED + "Teleport point NOT selected. Please make sure that you are setting the teleport point inside the Jail's corners.");
|
||||
player.sendMessage(ChatColor.RED + "----------------------------------------");
|
||||
}
|
||||
@ -94,7 +94,7 @@ public class CellCreationSteps {
|
||||
cp.addSign(new SimpleLocation(block.getLocation()));
|
||||
player.sendMessage(ChatColor.GREEN + "Sign added, if you want to select another go ahead otherwise right click on any non-sign block.");
|
||||
}else {
|
||||
player.sendMessage(ChatColor.AQUA + "---------- Jail Cell Creation ----------");
|
||||
player.sendMessage(ChatColor.AQUA + "---------- Jail Cell Creation (chest) ----------");
|
||||
player.sendMessage(ChatColor.GREEN + (cp.getSigns().size() != 0 ? "Sign selection completed. " : "") + "Now select a double chest associated with this cell. If there is no chest click on any non-chest block. (Please note that having no chest may result in players items being lost.)");
|
||||
player.sendMessage(ChatColor.AQUA + "----------------------------------------");
|
||||
cp.nextStep();
|
||||
@ -120,7 +120,7 @@ public class CellCreationSteps {
|
||||
player.sendMessage(ChatColor.GREEN + "Chest selected.");
|
||||
player.sendMessage(ChatColor.AQUA + "----------------------------------------");
|
||||
}else {
|
||||
player.sendMessage(ChatColor.RED + "---------- Jail Cell Creation ----------");
|
||||
player.sendMessage(ChatColor.RED + "---------- Jail Cell Creation (chest) ----------");
|
||||
player.sendMessage(ChatColor.RED + "Chest must be a double chest, chest not selected");
|
||||
player.sendMessage(ChatColor.RED + "----------------------------------------");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user