mirror of
https://github.com/NLthijs48/AreaShop.git
synced 2024-11-05 18:31:40 +01:00
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:
parent
00d3256716
commit
a14dc4e541
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user