update viewers list before showing the npc to prevent the show/hide methods from being called multiple times by the processor task when the method needs extra time to grab skins which causes some problems including multiple teams being created resulting in client warnings/kicks on BungeeCord

This commit is contained in:
Pyrbu 2023-07-25 03:14:41 +02:00
parent 32b588807a
commit 52f083583b

@ -27,14 +27,14 @@ public abstract class Viewable {
public void show(Player player) {
if (viewers.contains(player)) return;
UNSAFE_show(player);
viewers.add(player);
UNSAFE_show(player);
}
public void hide(Player player) {
if (!viewers.contains(player)) return;
UNSAFE_hide(player);
viewers.remove(player);
UNSAFE_hide(player);
}
public boolean isShown(Player player) {