I’ve been trying to figure out how to figure out a players max food level. I can’t find it probably due to a lack of knowledge for the Sponge API (I’m Probably missing something really simple). I’m pretty sure the max for food level is 20, but I’d rather not use that in case in a future Minecraft version something changes. Plus having a variable for it shows what it represents in the code, rather than having to guess that 20 is the max food level.
I found how to get the max health (Keys.MAX_HEALTH) via Sponge docs, but I cannot find out how to get the max level for food. I’m making simple commands at the moment to figure out how the Sponge API works, and I’m pretty stumped right now. I’m using version 4.1.0 of Sponge on Minecraft 1.8.9. Any help or direction would be appreciated.
Additionally, if there are any other tips you can give in terms of figuring out the max level of other attributes that would be appreciated.