I was reading on hunger mechanics, and I cannot find anything on exhaustion! I need to know how to use this for a plugin of mine. Basically what it does is make flight cost like sprinting, but it's inaccurate because I have no idea how to use exhaustion! I know the basics, like get and set but in the Minecraft Wiki it says it adds exhaustion per meter of movement. This is what I need to do and I would like it if someone would explain it to me.
Yes I know this I read all that, but for instance it says that while sprinting/moving it only increases per meter. How can I cause flight to do this?
well, i suggest that you have a repeating task, that iterates through the online player list, if the player is flying (you seem to know how to determine this, so ill leave it up to you) Then you add to the players exhaustion level.
I thought I would have to do it that way. xD I was just hoping there was a more simple event for instance that would fire when they traveled a meter. Thanks!
well you could listen for a player move event... But the thing fires so frequently, i think it would fire about 15-25 times in the time it takes to jump.