I have a BlockBreakEvent and need to know if the breaked block is a fully grown wheat seed.
My code so far is:
@EventHandler
public void onBreak(BlockBreakEvent e) {
Player player = e.getPlayer();
String name = player.getName();
if (e.getBlock().getType() == Material.WHEAT) {
// ...
}
}
Right now my if is also entered when the block is not fully grown yet. So how can I edit this condition to also check for the seed being fully grown?
I am using CraftBukkit 1.15.2.