diff --git a/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java b/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java index 14c1981..407f10a 100644 --- a/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java +++ b/src/me/ryanhamshire/GriefPrevention/CleanupUnusedClaimPreTask.java @@ -38,10 +38,15 @@ class CleanupUnusedClaimPreTask implements Runnable //get the data PlayerData ownerData = GriefPrevention.instance.dataStore.getPlayerDataFromStorage(claim.ownerID); + 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 int bonusBlocks = ownerData.getBonusClaimBlocks(); - if(bonusBlocks >= GriefPrevention.instance.config_claims_expirationExemptionBonusBlocks) return; - if(bonusBlocks + ownerData.getAccruedClaimBlocks() >= GriefPrevention.instance.config_claims_expirationExemptionTotalBlocks) return; + if(bonusBlocks >= GriefPrevention.instance.config_claims_expirationExemptionBonusBlocks || bonusBlocks + ownerData.getAccruedClaimBlocks() >= GriefPrevention.instance.config_claims_expirationExemptionTotalBlocks) + { + GriefPrevention.AddLogEntry("Player exempt from claim expiration based on claim block counts vs. config file settings.", CustomLogEntryTypes.Debug, true); + return; + } //pass it back to the main server thread, where it's safe to delete a claim if needed Bukkit.getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, new CleanupUnusedClaimTask(claim, ownerData), 1L); diff --git a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java index f2346d2..fcd329e 100644 --- a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java @@ -162,7 +162,7 @@ class PlayerEventHandler implements Listener } //otherwise assume chat troll and mute all chat from this sender until an admin says otherwise - else + else if(GriefPrevention.instance.config_trollFilterEnabled) { GriefPrevention.AddLogEntry("Auto-muted new player " + player.getName() + " for profanity shortly after join. Use /SoftMute to undo.", CustomLogEntryTypes.AdminActivity); GriefPrevention.instance.dataStore.toggleSoftMute(player.getUniqueId());