Big update (New settings + professions)
(+) Added canOtherPeopleRenamePiglin inside the config. This option will prevent other players from using a name tag on your piglin.
(+) Added curedPiglinKeepsOldItems inside the config. This option ensures that the piglin will retain any items it had when it was a zombified piglin.
(+) Added curedPiglinKeepsNBTTags inside the config. This option will preserve most NBT tags the piglin had when it was a zombified piglin, including the teams it was part of.
(+) Piglins will now be added back into their respective teams after a server restart, and they will retain most NBT tags.
Note: Some NBT tags are not accessible using the Spigot API, and therefore, I cannot add them with my plugin.
(+) Added professions! Check the professions.yml file.
(+) Professions can be disabled.
(+) Ability to change the loot table for every profession. This includes the amount, material, name, lore, enchants, and potion effects. Enchants can be defined to have a random level, e.g., [enchant]:[minLevel]-[maxLevel] or [enchant]:[level]. Potions can have a random duration and effect level, e.g., [potionType]:[minLevel]-[maxLevel]:[minDurationInSeconds]-[maxDurationInSeconds], or [potionType]:[level]:[durationinSeconds].
(+) Ability to specify which items a profession can pick up and trade with - only for Spigot version 1.16.5 and up.
(+) Ability to change the chance a piglin will select professions once they are cured.
(+) Ability to change how many items a profession can pick up at once. E.g., default: minValue: 1, exampleProfession: minValue: 3, maxValue: 8. The value will be selected randomly between 3 and 8.
(+) Ability to define certain items that will allow piglins to change their profession when right-clicked, based on a chance.
(+) Setting allowProfessionChange, if enabled, will allow piglins to change professions using the aforementioned item if and only if they have the default permission.
(+) Setting allowProfessionChangeAfter works similarly to the setting above but applies if the piglin has a profession other than the default. The previous setting needs to be enabled for this one to work.
(+) Setting professionCanBeChangedByNonOwner determines if a non-curer player can try to change a piglin's profession using the aforementioned items.
(+) Setting canPreciousItemsBeUsed defines a precious material. Precious items have changed name, lore, enchants, NBT tags, etc. If this setting is enabled, then piglins won't be able to pick up those items for trade. Moreover, these items won't be usable to change professions.
(+) Added the ability to change the skin of each profession, which requires the DisguiseAPI plugin to be installed. Check the comments in the professions.yml file for configuration details. One limitation of this setting is that you can't have baby piglins with skins; they will appear adult-sized, but the entity behind the disguise will still be a baby.
(/) Fixed some bugs related to the spawning of piglins.
(/) The config file will now back itself up after updating the plugin for the first time.
(/) The piglin data file will now back itself up after every server start. This option can be disabled in the config.
(/) It has been a very long time since I last updated this plugin, over a year ago, and I didn't quite remember how the code worked. I didn't attempt to study it; I just jumped in and made the changes. I haven't encountered any data corruption between changing versions, but that's why the data.yml file backup was implemented, just in case.
If you encounter any bugs or have suggestions you want implemented, contact me on Discord: balustrada. I only log into my Spigot account once every couple of months, so you'll receive a much faster response there.