Performance - Eliminated unnecessary net traffic.

This commit is contained in:
ryanhamshire 2014-10-02 14:15:23 -07:00
parent cd628446fa
commit 99986cc7b2
2 changed files with 2 additions and 6 deletions

View File

@ -188,11 +188,7 @@ class CleanupUnusedClaimsTask implements Runnable
}
}
//toss that player data out of the cache, it's probably not needed in memory right now
if(!GriefPrevention.instance.getServer().getOfflinePlayer(claim.ownerID).isOnline())
{
GriefPrevention.instance.dataStore.clearCachedPlayerData(claim.ownerID);
}
GriefPrevention.instance.dataStore.clearCachedPlayerData(claim.ownerID);
//since we're potentially loading a lot of chunks to scan parts of the world where there are no players currently playing, be mindful of memory usage
if(cleanupChunks)

View File

@ -43,7 +43,7 @@ class PlayerKickBanTask implements Runnable
if(this.banReason != null)
{
//ban
GriefPrevention.instance.getServer().getOfflinePlayer(this.player.getUniqueId()).setBanned(true);
this.player.setBanned(true);
//kick
if(this.player.isOnline())