Added debug log entries for claim expiration.
If enabled, will log each time it checks a player and if that player is exempt, will note that as well.
This commit is contained in:
parent
a6b7e97b41
commit
f70e599783
|
|
@ -38,10 +38,15 @@ class CleanupUnusedClaimPreTask implements Runnable
|
||||||
//get the data
|
//get the data
|
||||||
PlayerData ownerData = GriefPrevention.instance.dataStore.getPlayerDataFromStorage(claim.ownerID);
|
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
|
//skip claims belonging to exempted players based on block totals in config
|
||||||
int bonusBlocks = ownerData.getBonusClaimBlocks();
|
int bonusBlocks = ownerData.getBonusClaimBlocks();
|
||||||
if(bonusBlocks >= GriefPrevention.instance.config_claims_expirationExemptionBonusBlocks) return;
|
if(bonusBlocks >= GriefPrevention.instance.config_claims_expirationExemptionBonusBlocks || bonusBlocks + ownerData.getAccruedClaimBlocks() >= GriefPrevention.instance.config_claims_expirationExemptionTotalBlocks)
|
||||||
if(bonusBlocks + ownerData.getAccruedClaimBlocks() >= GriefPrevention.instance.config_claims_expirationExemptionTotalBlocks) return;
|
{
|
||||||
|
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
|
//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);
|
Bukkit.getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, new CleanupUnusedClaimTask(claim, ownerData), 1L);
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ class PlayerEventHandler implements Listener
|
||||||
}
|
}
|
||||||
|
|
||||||
//otherwise assume chat troll and mute all chat from this sender until an admin says otherwise
|
//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.AddLogEntry("Auto-muted new player " + player.getName() + " for profanity shortly after join. Use /SoftMute to undo.", CustomLogEntryTypes.AdminActivity);
|
||||||
GriefPrevention.instance.dataStore.toggleSoftMute(player.getUniqueId());
|
GriefPrevention.instance.dataStore.toggleSoftMute(player.getUniqueId());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user