Now that the new ChangeDataHolderEvent et al. is implemented, how do we use it? I couldn’t find any examples or preexisting plugins.
For example, I want to stop players’ food level from changing. Here is a code example:
@Listener
public void onPostInit(GamePostInitializationEvent event)
{
Keys.FOOD_LEVEL.registerEvent(Player.class, e -> System.out.println("a"));
//just printing a line for testing purposes
}
However, it doesn’t seem to actually work. Do I need a listener somewhere?