I thought that players get hurt when stepping on lava blocks already, but it doesn't work for me. To achieve this, the OnEnterBlock event needs to be caught and handled.
@ReceiveEvent
public void onEnterBlock(OnEnterBlockEvent event, EntityRef entity) {
...
}