diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java index 842cd3954..ed7dc163d 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java @@ -885,13 +885,19 @@ public class McMMOPlayer { /** * This method is called by PlayerQuitEvent to tear down the mcMMOPlayer. + * + * @param syncSave if true, data is saved synchronously */ - public void logout() { + public void logout(boolean syncSave) { Player thisPlayer = getPlayer(); resetAbilityMode(); BleedTimerTask.bleedOut(thisPlayer); - getProfile().scheduleAsyncSave(); + if (syncSave) { + getProfile().save(); + } else { + getProfile().scheduleAsyncSave(); + } UserManager.remove(thisPlayer); ScoreboardManager.teardownPlayer(thisPlayer); diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index dc65d8f07..6f546cb63 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -359,7 +359,7 @@ public class PlayerListener implements Listener { } McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); - mcMMOPlayer.logout(); + mcMMOPlayer.logout(false); } /**