JitseB / NPCLib

(Minecraft) NPCLib – Basic non-player character library.
MIT License
197 stars 49 forks source link

Fix NPC not fully loading if constructed when no players are online #175

Open Archonic944 opened 2 years ago

Archonic944 commented 2 years ago

Describe the bug If an NPC is constructed using NPCLib#createNPC() while no players are online, that NPC, no matter when it is created, will only show armor stand lines when calling NPC#show on a certain player. At no point was an exception thrown relating to NPCLib, or during NPC creation, and at no point was the NPCLib instance I was using null.

NPCLib usage option 2

NPCLib JAR name NPCLib.jar (My JAR is renamed. However, the plugin loader states the plugin name as "NPCLibPlugin v2.11.1-SNAPSHOT").

Server version git-NachoSpigot-"39f2882" (MC: 1.8.8) (Implementing API version 1.8.8-R0.2-SNAPSHOT)

To Reproduce Steps to reproduce the behavior:

Expected behavior I expected for the entire NPC to be spawned, not just its name tags, immediately after a player joined.

Screenshots

Screen Shot 2021-12-29 at 9 41 55 PM

Additional context I actually have already cobbled together a little fix for this problem by queuing an NPC's creation for the next PlayerJoinEvent if no players are currently online. Maybe that'll help?

TheDumbledodo commented 2 years ago

Im having the same probleme