From 129f6920456b44baacfcbf91f1e6920c18b4646e Mon Sep 17 00:00:00 2001 From: BONNe Date: Wed, 8 Jul 2020 09:56:55 +0300 Subject: [PATCH] Comment out code that removes player from local cache on leaving server. It is done due #246 reported that relog could be done faster than async saving. --- .../bentobox/challenges/ChallengesManager.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/world/bentobox/challenges/ChallengesManager.java b/src/main/java/world/bentobox/challenges/ChallengesManager.java index f522c67..28a7c70 100644 --- a/src/main/java/world/bentobox/challenges/ChallengesManager.java +++ b/src/main/java/world/bentobox/challenges/ChallengesManager.java @@ -430,12 +430,15 @@ public class ChallengesManager */ 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