From 26f3578a03c6b5fb85c1e5b05f1548b3b0cb6536 Mon Sep 17 00:00:00 2001 From: RoboMWM Date: Sat, 8 Oct 2016 15:49:17 -0700 Subject: [PATCH] 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 --- .../ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java b/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java index 168b781..93eace3 100644 --- a/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java +++ b/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java @@ -43,6 +43,7 @@ class CleanupUnusedClaimPreTask implements Runnable //expiration code uses last logout timestamp to decide whether to expire claims //don't expire claims for online players if(ownerInfo.isOnline()) return; + if(ownerInfo.getLastPlayed() <= 0) return; GriefPrevention.AddLogEntry("Looking for expired claims. Checking data for " + claim.ownerID.toString(), CustomLogEntryTypes.Debug, true);