Jump to content

Vazelek

Members
  • Posts

    1
  • Joined

  • Last visited

Vazelek's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hey, I am trying to learn how to mod forge 1.12.2 and I would like to succeed in detecting and doing an action when the player jumps. For this I use the LivingJumpEvent event but I'm not sure how it works. I tried to make it display a message, but this code does not work. Maybe something is missing or there is an error. My code: @SubscribeEvent public void jumpEvent(LivingJumpEvent e) { if(e.getEntity() instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) e.getEntity(); player.sendMessage(new TextComponentString("hi")); } } Thanks for your help
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.