PlayerNPC API 2022.3 version Before updating your plugin, check if all dependencies are updated with this version. New features!
Added support for Spigot 1.18.2
Currently supported versions 1.18, 1.18.1, 1.18.2
To generate an NPC instance now use NPCLib.getInstance().generateNPC(Player, Plugin, String, Location)
To get an NPC instance now use NPCLib.getInstance().getNPC(Player, Plugin, String);
Added npc.getEntity();
Added NPC.Skin.Part enum with CAPE, JACKET, LEFT and RIGHT SLEEVE, LEFT and RIGHT PANTS, HAT
Added new methods on NPC.Skin.Parts
Code changes (this may produce errors on old plugin dependencies)
NPC instances now require to specify the Plugin when creating the instance. This will produce that the npc.getCode(); will be "yourPluginName.code". You can also get only the code without the prefix with npc.getSimpleCode();
Now all NPC methods are voids, no longer returning the NPC instance.
Future updates:
Global NPCs will be and object to manage a Global NPC object that will manage all the personal NPCs of all the players. This will help to create NPCs visible for all the players, but customizable for each player at the same time (for example, all the players will see the NPC but each will see with their own Skin), and this will redouce server lag. This is a lot requested feature, and will be introduced probably in the next update.
Persistent NPCs will be the posibility to save all the Global NPC data into a file, and will be saved when the server closes, and loaded when the server starts. With this you will be able to create NPCs that will be persistent forever, until you remove it. Very useful, for example, to create the NPCs of a Lobby for selecting game modes. This feature will be introduced in a few updates ahead.
NPC command will be more useful, with all this new features. Remmeber that this command is only for experimental purposes, and in the future will be fully usefull with the Persistent and Global NPCs
I hope you enjoy this new update, and leave feedback. Thank you for using PlayerNPC API