Remove lastActive from region file when unrented/sold

No problems if it is there, but just keeping the region file clean.
This commit is contained in:
Thijs Wiefferink 2015-09-11 22:44:12 +02:00
parent 4d70571a23
commit 9c357fe929
3 changed files with 7 additions and 1 deletions

View File

@ -456,7 +456,8 @@ public class BuyRegion extends GeneralRegion {
/* Remove friends and the owner */
clearFriends();
setBuyer(null);
setBuyer(null);
removeLastActiveTime();
updateSigns();
// Run commands

View File

@ -313,6 +313,10 @@ public abstract class GeneralRegion implements GeneralRegionInterface, Comparabl
}
}
public void removeLastActiveTime() {
setSetting("general.lastActive", null);
}
/**
* Get the World of the region
* @return The World where the region is located

View File

@ -608,6 +608,7 @@ public class RentRegion extends GeneralRegion {
setRenter(null);
setRentedUntil(null);
setTimesExtended(-1);
removeLastActiveTime();
updateSigns();
// Run commands