Fix some spacing issues introduced by the last commit.

This commit is contained in:
graywolf336 2014-08-19 14:34:02 -05:00
parent 81da8ddb59
commit 85e1106b42
3 changed files with 122 additions and 122 deletions

View File

@ -103,7 +103,7 @@ public class Util {
msg = msg.replaceAll("%uuid%", p.getUUID().toString()); msg = msg.replaceAll("%uuid%", p.getUUID().toString());
msg = msg.replaceAll("%reason%", p.getReason()); msg = msg.replaceAll("%reason%", p.getReason());
msg = msg.replaceAll("%jailer", p.getJailer()); msg = msg.replaceAll("%jailer", p.getJailer());
msg = msg.replaceAll("%afktime%", TimeUnit.MILLISECONDS.toMinutes(p.getAFKTime()) + "m"); msg = msg.replaceAll("%afktime%", TimeUnit.MILLISECONDS.toMinutes(p.getAFKTime()) + " mins");
if(p.getRemainingTime() >= 0) { if(p.getRemainingTime() >= 0) {
msg = msg.replaceAll("%timeinminutes%", String.valueOf(p.getRemainingTimeInMinutes())); msg = msg.replaceAll("%timeinminutes%", String.valueOf(p.getRemainingTimeInMinutes()));

View File

@ -29,24 +29,24 @@ public class CellSignListener implements Listener {
@EventHandler @EventHandler
public void changeTheCellSigns(PrisonerTimeChangeEvent event) { public void changeTheCellSigns(PrisonerTimeChangeEvent event) {
if(event.hasCell() && event.getCell().hasSigns()) { if (event.hasCell() && event.getCell().hasSigns()) {
HashSet<SimpleLocation> signs = event.getCell().getSigns(); HashSet<SimpleLocation> signs = event.getCell().getSigns();
String s1 = Util.replaceAllVariables(event.getPrisoner(), lineOne); String s1 = Util.replaceAllVariables(event.getPrisoner(), lineOne);
String s2 = Util.replaceAllVariables(event.getPrisoner(), lineTwo); String s2 = Util.replaceAllVariables(event.getPrisoner(), lineTwo);
String s3 = Util.replaceAllVariables(event.getPrisoner(), lineThree); String s3 = Util.replaceAllVariables(event.getPrisoner(), lineThree);
String s4 = Util.replaceAllVariables(event.getPrisoner(), lineFour); String s4 = Util.replaceAllVariables(event.getPrisoner(), lineFour);
for(SimpleLocation s : signs) { for (SimpleLocation s : signs) {
if(s.getLocation().getBlock().getState() instanceof Sign) { if (s.getLocation().getBlock().getState() instanceof Sign) {
Sign sign = (Sign) s.getLocation().getBlock().getState(); Sign sign = (Sign) s.getLocation().getBlock().getState();
sign.setLine(0, s1); sign.setLine(0, s1);
sign.setLine(1, s2); sign.setLine(1, s2);
sign.setLine(2, s3); sign.setLine(2, s3);
sign.setLine(3, s4); sign.setLine(3, s4);
sign.update(); sign.update();
}else { } else {
//Remove the sign from the cell since it isn't // Remove the sign from the cell since it isn't
//a valid sign // a valid sign
event.getCell().getSigns().remove(s); event.getCell().getSigns().remove(s);
} }
} }
@ -55,20 +55,20 @@ public class CellSignListener implements Listener {
@EventHandler @EventHandler
public void clearTheCellSigns(PrisonerReleasedEvent event) { public void clearTheCellSigns(PrisonerReleasedEvent event) {
if(event.hasCell() && event.getCell().hasSigns()) { if (event.hasCell() && event.getCell().hasSigns()) {
HashSet<SimpleLocation> signs = event.getCell().getSigns(); HashSet<SimpleLocation> signs = event.getCell().getSigns();
for(SimpleLocation s : signs) { for (SimpleLocation s : signs) {
if(s.getLocation().getBlock().getState() instanceof Sign) { if (s.getLocation().getBlock().getState() instanceof Sign) {
Sign sign = (Sign) s.getLocation().getBlock().getState(); Sign sign = (Sign) s.getLocation().getBlock().getState();
sign.setLine(0, ""); sign.setLine(0, "");
sign.setLine(1, Lang.CELLEMPTYSIGN.get()); sign.setLine(1, Lang.CELLEMPTYSIGN.get());
sign.setLine(2, ""); sign.setLine(2, "");
sign.setLine(3, ""); sign.setLine(3, "");
sign.update(); sign.update();
}else { } else {
//Remove the sign from the cell since it isn't // Remove the sign from the cell since it isn't
//a valid sign // a valid sign
event.getCell().getSigns().remove(s); event.getCell().getSigns().remove(s);
} }
} }
@ -77,43 +77,43 @@ public class CellSignListener implements Listener {
@EventHandler @EventHandler
public void handleSignsOnTransfer(PrisonerTransferredEvent event) { public void handleSignsOnTransfer(PrisonerTransferredEvent event) {
if(event.hasOriginalCell() && event.getOriginalCell().hasSigns()) { if (event.hasOriginalCell() && event.getOriginalCell().hasSigns()) {
HashSet<SimpleLocation> signs = event.getOriginalCell().getSigns(); HashSet<SimpleLocation> signs = event.getOriginalCell().getSigns();
for(SimpleLocation s : signs) { for (SimpleLocation s : signs) {
if(s.getLocation().getBlock().getState() instanceof Sign) { if (s.getLocation().getBlock().getState() instanceof Sign) {
Sign sign = (Sign) s.getLocation().getBlock().getState(); Sign sign = (Sign) s.getLocation().getBlock().getState();
sign.setLine(0, ""); sign.setLine(0, "");
sign.setLine(1, Lang.CELLEMPTYSIGN.get()); sign.setLine(1, Lang.CELLEMPTYSIGN.get());
sign.setLine(2, ""); sign.setLine(2, "");
sign.setLine(3, ""); sign.setLine(3, "");
sign.update(); sign.update();
}else { } else {
//Remove the sign from the cell since it isn't // Remove the sign from the cell since it isn't
//a valid sign // a valid sign
event.getOriginalCell().getSigns().remove(s); event.getOriginalCell().getSigns().remove(s);
} }
} }
} }
if(event.hasTargetCell() && event.getTargetCell().hasSigns()) { if (event.hasTargetCell() && event.getTargetCell().hasSigns()) {
HashSet<SimpleLocation> signs = event.getTargetCell().getSigns(); HashSet<SimpleLocation> signs = event.getTargetCell().getSigns();
String s1 = Util.replaceAllVariables(event.getPrisoner(), lineOne); String s1 = Util.replaceAllVariables(event.getPrisoner(), lineOne);
String s2 = Util.replaceAllVariables(event.getPrisoner(), lineTwo); String s2 = Util.replaceAllVariables(event.getPrisoner(), lineTwo);
String s3 = Util.replaceAllVariables(event.getPrisoner(), lineThree); String s3 = Util.replaceAllVariables(event.getPrisoner(), lineThree);
String s4 = Util.replaceAllVariables(event.getPrisoner(), lineFour); String s4 = Util.replaceAllVariables(event.getPrisoner(), lineFour);
for(SimpleLocation s : signs) { for (SimpleLocation s : signs) {
if(s.getLocation().getBlock().getState() instanceof Sign) { if (s.getLocation().getBlock().getState() instanceof Sign) {
Sign sign = (Sign) s.getLocation().getBlock().getState(); Sign sign = (Sign) s.getLocation().getBlock().getState();
sign.setLine(0, s1); sign.setLine(0, s1);
sign.setLine(1, s2); sign.setLine(1, s2);
sign.setLine(2, s3); sign.setLine(2, s3);
sign.setLine(3, s4); sign.setLine(3, s4);
sign.update(); sign.update();
}else { } else {
//Remove the sign from the cell since it isn't // Remove the sign from the cell since it isn't
//a valid sign // a valid sign
event.getTargetCell().getSigns().remove(s); event.getTargetCell().getSigns().remove(s);
} }
} }