API improvement
snakehugo opened this issue ยท 4 comments
Hello!
Sorry to bother you but I'm trying to use your API to hide the helmet of a player.
So I tried:
CosArmorAPI.getCAStacks(context.getSource().asPlayer().getUniqueID()).setHidden("minecraft","iron_helmet", true);
But it seems to not hide the iron_helmet.
Also is it possible for you to improve your API to be able to just write:
CosArmorAPI.getPlayer(UUID).getEffectiveSlot(0).setHidden(true);
In order to hide the player's helmet without having to set any specific modid or identifier or is that more complex that I think of?
Sorry about not making it clear, you should use setSkinArmor(3, true)
to hide target player's helmet slot.
setHidden()
is not used currently, it was introduced for supporting curios slots, and was left in there for compatibility.
I should remove these unused stuff in the future.
Okay maybe I'm not done x)
I hide the player's helmet when he clicks on a homemade button and it works.
But after a disconnection, it's not remaining hidden. Is that made in purpose?
Ohhhhhh!
I should have ask the question way earlier ):
I spent like 3 days on implementing a solution by myself and failed! I found no way to hide the armor on the OnRenderPlayer.Pre event. I successfully hidden the whole head though.
And I finally found how to use your API by "trying and error" like 30minutes ago!! I didn't see your message earlier
Thanks a lot, I managed to do it with the setSkinArmor!