lenis0012 / NPCFactory

NPC Library for CraftBukkit mod.
MIT License
24 stars 19 forks source link

NPCs no longer show in player list. #22

Closed SupaHam closed 9 years ago

SupaHam commented 9 years ago

Without this PR, an NPC would have their own entry in the player list (the tab list). This can get really frustrating as more and more NPCs are created. So this PR sends a remove player info packet on join for every single NPC. I would have really prefered to use ProtocolLib for this and instead listen for that packet being sent to the client and modify it.

This has been tested a little bit, sometimes the entry doesn't get removed. I tried tweaking the ticks but 10 is as high as it should be, otherwise you'll have players who quickly tab and see a bunch of players missing, they'll get confused.