diff --git a/src/me/ryanhamshire/GriefPrevention/DataStore.java b/src/me/ryanhamshire/GriefPrevention/DataStore.java index 2fc6d0a..5fbe4fc 100644 --- a/src/me/ryanhamshire/GriefPrevention/DataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DataStore.java @@ -564,6 +564,12 @@ public abstract class DataStore return result; } + //saves changes to player data to secondary storage. MUST be called after you're done making changes, otherwise a reload will lose them + public void savePlayerDataSync(UUID playerID, PlayerData playerData) + { + this.asyncSavePlayerData(playerID, playerData); + } + //saves changes to player data to secondary storage. MUST be called after you're done making changes, otherwise a reload will lose them public void savePlayerData(UUID playerID, PlayerData playerData) { diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index 8105ea3..9d96854 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -2226,7 +2226,7 @@ public class GriefPrevention extends JavaPlugin Player player = players[i]; UUID playerID = player.getUniqueId(); PlayerData playerData = this.dataStore.getPlayerData(playerID); - this.dataStore.savePlayerData(playerID, playerData); + this.dataStore.savePlayerDataSync(playerID, playerData); } this.dataStore.close();