Negating fall damage

Discussion in 'Bukkit Help' started by OcelotcR, May 30, 2013.

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

    OcelotcR

    Hey there, alot of plugins negate fall damage if you do a command. Im attempting to not do it through commands and i've got the following code.

    Code:
     @EventHandler
      public void onFall(EntityDamageEvent evt) {
        Player p = evt.getPlayer();
        if ((evt.getCause().equals(EntityDamageEvent.DamageCause.FALL));
          evt.setCancelled(true);
      }
    But it doesn't seem too work though the code to me appears right.
     
  2. Offline

    Camaflicks

    Player isnt an entity. Set the entity to be a player.
     
Thread Status:
Not open for further replies.

Share This Page