Extra check on getLastPlayed

In case getOfflinePlayer failed, or getting a proper claim owner failed
somehow.

Yup, that's where I was going to add it.
Closes #22
This commit is contained in:
RoboMWM 2016-10-08 15:49:17 -07:00
parent 5638f02bf0
commit 26f3578a03

View File

@ -43,6 +43,7 @@ class CleanupUnusedClaimPreTask implements Runnable
//expiration code uses last logout timestamp to decide whether to expire claims //expiration code uses last logout timestamp to decide whether to expire claims
//don't expire claims for online players //don't expire claims for online players
if(ownerInfo.isOnline()) return; if(ownerInfo.isOnline()) return;
if(ownerInfo.getLastPlayed() <= 0) return;
GriefPrevention.AddLogEntry("Looking for expired claims. Checking data for " + claim.ownerID.toString(), CustomLogEntryTypes.Debug, true); GriefPrevention.AddLogEntry("Looking for expired claims. Checking data for " + claim.ownerID.toString(), CustomLogEntryTypes.Debug, true);