xSavior-of-God / ArmorStand-Limiter

Problems with tps? Is it ArmorStand's fault? Use ArmorStandLimiter to prevent your server from crash
MIT License
3 stars 1 forks source link

DisableIfHasHelmet not working bug #4

Closed kaxlabs closed 2 years ago

kaxlabs commented 2 years ago

I'm using 1.18.2 papermc and the current comparison to determine if armorstands are wearing a helmet doesn't work. I recommend changing it to armorstand.getEquipment().getHelmet().getType() != Material.AIR for later versions of mc.

kaxlabs commented 2 years ago

Alternatively, I'd prefer if this check instead ignores all armorstands that have an item in any equipment slot.

xSavior-of-God commented 2 years ago

Hi @kaxon-dev, thanks again for the report... I fixed the problem

https://github.com/xSavior-of-God/ArmorStand-Limiter/blob/e298b2bb4c1140fafc935f313ceaf25bace7f8cb/src/main/java/com/xSavior_of_God/ArmorStandLimiter/Utilis.java#L96-L97

If you want to try it, download the latest artifact from here: https://github.com/xSavior-of-God/ArmorStand-Limiter/actions/runs/2039578323