diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java index 7f6d3d7..53586d2 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java @@ -162,7 +162,7 @@ private void loadPlayer(final @NotNull MinepacksPlayerData player) public void loadBackpack(final @NotNull MinepacksPlayerData player) { player.setBackpackLoadingRequested(true); - backend.loadPlayer(player); + backend.loadBackpack(player); } @EventHandler diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/MinepacksPlayerData.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/MinepacksPlayerData.java index 77c0389..a97e452 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/MinepacksPlayerData.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/MinepacksPlayerData.java @@ -77,6 +77,7 @@ public void setBackpack(final @NotNull Backpack backpack) { this.backpack = backpack; backpackLoadedQueue.forEach(backpackCallback -> backpackCallback.onResult(backpack)); + backpackLoadedQueue.clear(); } public void setLoaded(final @NotNull Object databaseKey, final long cooldown) @@ -84,6 +85,7 @@ public void setLoaded(final @NotNull Object databaseKey, final long cooldown) this.databaseKey = databaseKey; this.cooldown = cooldown; playerLoadedQueue.forEach(loadedCallback -> loadedCallback.onResult(this)); + playerLoadedQueue.clear(); } public void setCooldownData(final long cooldown)