Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Archonic944 opened this issue Dec 30, 2021 · 1 comment
Open
Labels
bug Something isn't working

Comments

@Archonic944
Copy link

Archonic944 commented Dec 30, 2021

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:

  • Used code https://pastebin.com/DweH4itS
  • Construct & create NPC immediately on server start, or before any players have joined (either one)
  • Show NPC for any player on join

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?

@Archonic944 Archonic944 added the bug Something isn't working label Dec 30, 2021
@TheDumbledodo
Copy link

Im having the same probleme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants