Closed jordanwilliams1 closed 4 years ago
After a lot of testing I've determined that the reason this occurs is because of a feature added to the plugin a long time ago to remove a conflict with NoCheatPlus.
This feature exempts a user from NCP rules, sends a test fake blockbreak event, then unexempts a user - this is in order to detect if the user actually can break blocks in the area outside of NCP rules (or other drop protection). So, Slimefun sees two blockbreak events, and so drops two heads.
When using NoCheatPlus in a protected area - there will be an un-cancelled blockbreak event despite the break actually being prevented. If you assume blockbreak = break is allowed, then a head will drop when attempting to break heads in protected area, duplicating them. Therefore it's necessary to send a fake event first to test if breaking is allowed.
I've made a commit ( df216dd39d0f7de2ec868fafa1fda824a93ce535 ) and a development build https://ci.meme.tips/job/PlayerHeads-5.2/16/
try using this build and the following command: /ph config set pretestblockbreak false
Changing this setting will break support for NoCheatPlus and maybe your protection plugin - you will need to test to make sure that's not the case.
As an alternative solution, I've also tried to look on the block for tags indicating that the head belonged to slimefun but.... it doesn't seem there are any to check https://i.imgur.com/nhCS3MX.png
Edit:
/ph config set pretestblockbreak false fixes the problem. I Dont have anti cheat so i cant test that.
Slimefun Necrotic Skull allows you to duplicate wither skulls. Just spawn one in with slimefun and break it with this plugin loaded. I've tried disabling the config options but the bug still presents0.
https://i.gyazo.com/7456c8c9e664e8e72f260e474dc44005.gif
antideathchest: false dropboringplayerheads: false fixdroppedheads: false pkonly: false