mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-27 11:38:03 +01:00
retrieve
must be called in worker threads
This commit is contained in:
parent
8c1c18e345
commit
d7ab273b60
@ -82,13 +82,13 @@ public class VillagerInventory extends Inventory {
|
||||
public void update() {
|
||||
super.update();
|
||||
this.tradeCache.invalidate();
|
||||
sendPacketToViewers(tradeCache.retrieve());
|
||||
sendPacketToViewers(tradeCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addViewer(@NotNull Player player) {
|
||||
final boolean result = super.addViewer(player);
|
||||
if (result) player.sendPacket(tradeCache.retrieve());
|
||||
if (result) player.sendPacket(tradeCache);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user