I want to get the food value of an item, and I don’t know how to get it. Is there maybe a Key value about foodvalue in items?
And in the UseItemStackEvent.Finish Event, how can I get what player finished using the ItemStack?
Has it something to do with the Cause? Will @Root get me the user?
And how can I find out if the used item is food?
And will the UseItemStackEvent.Finish Event even trigger when consuming food?
Checking the value that food increases without checking the event … I dont know how to do.
But i would use https://github.com/SpongePowered/SpongeAPI/blob/bleeding/src/main/java/org/spongepowered/api/event/data/ChangeDataHolderEvent.java
From there you can get the DataHolder (upcast it to player) and also you can see the change in the food value.
Please note that this event you will need to check that the event is firing due to food key.
Last time i check this event was not implemented. But that was api 4
Thank you! But how can I find out if it triggered by food consumption?
That i dont know XD ill see what i can find
There is a section in Causes (event.getCause()), in the Sponge JavaDocs. One of the HealingTypes is Food. You could probably go down this route somehow.
org.spongepowered.api.event.cause.entity.health
^ Thats the section in the Javadocs I was looking.
But if you got full health, would it be triggered? because it’s a healing event 
In Minecraft, healing isn’t just health… at least, not that Im aware of… ? I mean you could check the ChangeDataEvent and use HealingTypes.Food as a cause, see if that pulls up anything…
(My assumption healing isn’t just health is based on there is nothing else related to food in events)
Additionally, you could try looking into this event:
UseItemStackEvent.Start
I’ll try it out and post then if it worked tomorrow
Ok. I found it … I think
event.getOriginalChanges().getSuccessfulData().get(0).getKey();
And then just compare that key to food level key
ChangeDataHolderEvent isn’t implemented yet, unfortunately. I have been looking into it, but there are some large event changes coming up that I’m waiting to be merged first.
In which event is this?
Edit: I found it, thank you! I will try it out now and tell if it worked. Maybe I am lucky 
Okay, yes, it’s not firing. I feel stupid for trying now xD So I’ll be waitin for the update…