I want to check if an npc is sneaking or not.
public boolean isSneaking() {
return citizen.getOrAddTrait(SneakTrait.class).isSneaking();
}```
when i call this method when the SneakTrait isnt applied to the npc, it will sneak and the boolean is true, without setting it to true.
Is there a way i can fix, that the sneaking is false when the trait gets applied?