Checking hit for critical

Discussion in 'Plugin Development' started by Pizza371, Aug 9, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Pizza371

    Is there any good way to check for a critical hit? I'm puzzled on how to do it through a damage event.
    Thanks.
     
  2. Offline

    GriffinPvP

    Well a critical hit happens when a player hits an entity while not on ground and falling, so:
    Code:
    if(!((Entity)player).isOnGround() && player.getVelocity().getY() < 0) {
    }
    should work just fine, didn't test it though.
     
Thread Status:
Not open for further replies.

Share This Page