Fix issues loading backpacks

This commit is contained in:
GeorgH93 2021-03-29 20:21:26 +02:00
parent 83c1ca1cc0
commit f7b51a3a28
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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)