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.
This commit is contained in:
BONNe 2020-07-08 09:56:55 +03:00
parent ce14c20126
commit 129f692045

View File

@ -430,12 +430,15 @@ public class ChallengesManager
*/ */
public void removeFromCache(UUID playerID) public void removeFromCache(UUID playerID)
{ {
if (!this.settings.isStoreAsIslandData() && this.playerCacheData.containsKey(playerID.toString())) // Remove due possible issues with saving... (#246)
{ // if (!this.settings.isStoreAsIslandData() && this.playerCacheData.containsKey(playerID.toString()))
// save before remove // {
// // save before remove
// this.savePlayerData(playerID.toString());
// this.playerCacheData.remove(playerID.toString());
// }
this.savePlayerData(playerID.toString()); this.savePlayerData(playerID.toString());
this.playerCacheData.remove(playerID.toString());
}
// TODO: It would be necessary to remove also data, if they stores islands. // 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 // Unfortunately, I do not know all worlds. Checking everything would be bad. Probably, I could