Fix a bug with the periodic updating of signs

If there is no sign connected to the region it would spam an error to
the console when the periodic update task runs.
This commit is contained in:
Thijs Wiefferink 2014-12-29 16:39:54 +01:00
parent 00d3256716
commit a14dc4e541
3 changed files with 3 additions and 3 deletions

View File

@ -406,7 +406,7 @@ public class BuyRegion extends GeneralRegion {
if(inactiveSetting <= 0 || player.isOp()) {
return false;
}
AreaShop.debug("inactivetimemillis: " + inactiveSetting * 60 * 1000);
//AreaShop.debug("inactivetimemillis: " + inactiveSetting * 60 * 1000);
if(Calendar.getInstance().getTimeInMillis() > (player.getLastPlayed() + inactiveSetting * 60 * 1000)) {
plugin.getLogger().info("Region " + getName() + " sold because of inactivity for player " + getPlayerName());
this.sell(true);

View File

@ -654,7 +654,7 @@ public abstract class GeneralRegion {
if(isDeleted() || !isRentRegion()) {
return false;
}
Set<String> signs = null;
Set<String> signs = new HashSet<String>();
if(config.getConfigurationSection("general.signs") != null) {
signs = config.getConfigurationSection("general.signs").getKeys(false);
}

View File

@ -607,7 +607,7 @@ public class RentRegion extends GeneralRegion {
if(inactiveSetting <= 0 || player.isOp()) {
return false;
}
AreaShop.debug("inactivetimemillis: " + inactiveSetting * 60 * 1000);
//AreaShop.debug("inactivetimemillis: " + inactiveSetting * 60 * 1000);
if(Calendar.getInstance().getTimeInMillis() > (player.getLastPlayed() + inactiveSetting * 60 * 1000)) {
plugin.getLogger().info("Region " + getName() + " unrented because of inactivity for player " + getPlayerName());
this.unRent(true);