mcmonkeyprojects / Sentinel

Combat NPCs for Spigot!
MIT License
168 stars 84 forks source link

Enchants on weapons in NPC inventory get shared with each weapon #312

Closed pinkyrelli closed 5 years ago

pinkyrelli commented 5 years ago

The output of command /version on my server is: (This server is running CraftBukkit version git-Spigot-065a373-9aa7430 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)) The output of command /version citizens on my server is: (2.025-SNAPSHOT (build 1745)) The output of command /version sentinel on my server is: (1.9.5 (build 289)) A pastebin.com link to my (full!) Sentinel/config.yml file is: (https://pastebin.com/1HGbY2PB)

I noticed when I put two weapons in an NPC's inventory to use for killing mobs, if one of the weapons had enchants on it, eventually the other weapon somehow picks up the enchants that were on the other item. I don't know if it has to do with the number of weapons placed in the inventory or not.

Furthermore I started to notice it seems that the weapons also are picking up additional enchants that were not on the original weapon, possibly from enchanted weapons dropped by mobs the NPC killed??? For example I placed a crossbow without any enchantments in an NPC's inventory, then a sword with only 2 enchantments, sharpness and knockback. Some days later I noticed the crossbow looked like it was enchanted so I looked in his inventory and sure enough both weapons had the same enchants that were originally only on the sword, additionally several more enchants (up to the max number of enchants for an item). So somehow it seems to be possible that the NPC is picking up enchants for the weapons its holding including some that shouldn't even be on the type of weapon. I haven't tried with unenchanted weapons to begin with to see if they too pick up enchants along the way.

mcmonkey4eva commented 5 years ago

I don't think this is likely to be a Sentinel issue. Do you have any plugins that do anything related to giving items, changing enchantments, etc.? Likely some form of 'reward' process meant for players being applied to NPCs.

Please try testing with other plugins removed. Most likely you'll find some other plugin(s) that, when removed, the issue stops happening. Refer also to https://wiki.citizensnpcs.co/Plugin_Conflict

If you can make this happen consistently on a server running only Citizens and Sentinel (no other plugins), reply below and we can reopen this and look into the possibility that it's not caused by another plugin.

pinkyrelli commented 5 years ago

Thanks, I will remove other plugins next time the server has a down moment (hopefully this week) and see if I can get it to do the same thing. I only have 6 plugins. Citizens, Sentinel, TreeGravity, EasyBackup, dynmap, VillagerOptimiser. No reward type system, pretty basic spigot server.