Skip to content

Commit

Permalink
Comment out code that removes player from local cache on leaving server.
Browse files Browse the repository at this point in the history
It is done due #246 reported that relog could be done faster than async saving.
  • Loading branch information
BONNe committed Jul 8, 2020
1 parent ce14c20 commit 129f692
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main/java/world/bentobox/challenges/ChallengesManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,15 @@ private void loadPlayerData(@NonNull ChallengesPlayerData playerData)
*/
public void removeFromCache(UUID playerID)
{
if (!this.settings.isStoreAsIslandData() && this.playerCacheData.containsKey(playerID.toString()))
{
// save before remove
this.savePlayerData(playerID.toString());
this.playerCacheData.remove(playerID.toString());
}
// Remove due possible issues with saving... (#246)
// if (!this.settings.isStoreAsIslandData() && this.playerCacheData.containsKey(playerID.toString()))
// {
// // save before remove
// this.savePlayerData(playerID.toString());
// this.playerCacheData.remove(playerID.toString());
// }

this.savePlayerData(playerID.toString());

// TODO: It would be necessary to remove also data, if they stores islands.
// Unfortunately, I do not know all worlds. Checking everything would be bad. Probably, I could
Expand Down

0 comments on commit 129f692

Please sign in to comment.