Fixed npc's not being visible

This commit is contained in:
Teriuihi 2023-09-22 02:20:59 +02:00
parent d453072465
commit 67a0871ae5

View File

@ -36,12 +36,12 @@ public abstract class LibNPC {
Optional<dev.sergiferry.playernpc.api.NPC.Global> tmp = spawn(
fishingEvent, npcCreateData.simpleId(), location, npcCreateData.skin(), nameTag,
(a, player) -> npc.rightClick(player), (a, player) -> npc.leftClick(player),
dev.sergiferry.playernpc.api.NPC.Global.Visibility.SELECTED_PLAYERS);
dev.sergiferry.playernpc.api.NPC.Global.Visibility.EVERYONE);
if (tmp.isEmpty()) {
return;
}
this.globalNPC = tmp.get();
globalNPC.hide();
globalNPC.show();
if (npcCreateData.mainHand() != null)
globalNPC.setItemInMainHand(new ItemStack(npcCreateData.mainHand(), 1));
if (npcCreateData.offHand() != null)