From 1ec0d3944baa92989cb7d37639ef70e936cfa0a2 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Wed, 4 May 2016 16:46:48 -0700 Subject: [PATCH] Don't expire land claims while owner is online. --- .../GriefPrevention/CleanupUnusedClaimPreTask.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java b/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java index e3511e1..168b781 100644 --- a/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java +++ b/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java @@ -40,6 +40,10 @@ class CleanupUnusedClaimPreTask implements Runnable PlayerData ownerData = GriefPrevention.instance.dataStore.getPlayerDataFromStorage(claim.ownerID); OfflinePlayer ownerInfo = Bukkit.getServer().getOfflinePlayer(claim.ownerID); + //expiration code uses last logout timestamp to decide whether to expire claims + //don't expire claims for online players + if(ownerInfo.isOnline()) return; + GriefPrevention.AddLogEntry("Looking for expired claims. Checking data for " + claim.ownerID.toString(), CustomLogEntryTypes.Debug, true); //skip claims belonging to exempted players based on block totals in config