Browse Source

city bane status update fix

lakebane2
FatBoy-DOTC 3 weeks ago
parent
commit
931eaaae4a
  1. 12
      src/engine/objects/City.java

12
src/engine/objects/City.java

@ -237,18 +237,22 @@ public class City extends AbstractWorldObject { @@ -237,18 +237,22 @@ public class City extends AbstractWorldObject {
writer.putInt(rulingGuild.getObjectUUID());
writer.putString(rulingGuild.getName());
if(city.getBane() != null) {
try {
if (city.getBane() != null) {
Bane bane = city.getBane();
if(bane.daySet && bane.timeSet && bane.getLiveDate() != null){
if (bane.daySet && bane.timeSet && bane.getLiveDate() != null) {
int day = bane.getLiveDate().dayOfMonth().get();
int month = bane.getLiveDate().getMonthOfYear();
int year = bane.getLiveDate().year().get();
int hour = bane.getLiveDate().getHourOfDay();
writer.putString("BANE SET: " + month + "/" + day + "/" + year + " " + hour + ":00 CST");
}else {
} else {
writer.putString("BANED!: Unset");
}
}else{
} else {
writer.putString(city.motto);
}
}catch(Exception e){
writer.putString(city.motto);
}
writer.putString(rulingGuild.getLeadershipType());

Loading…
Cancel
Save