Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-1516

Method Entity#damage(Integer) doesn't call EntityDamageEvent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • Windows 10, IntelliJ Debug

      I have this listener
      [code]
      @EventHandler(priority = EventPriority.HIGHEST)
      public void damage(EntityDamageEvent e) {
      nServer.log(Level.DEBUG, "IS PLAYER: " + (e.getEntity() instanceof Player));
      if (e.getEntity() instanceof Player)

      { Player p = (Player) e.getEntity(); nServer.log(Level.DEBUG, "WONT KILL: " + (p.getHealth() - e.getDamage() > 0)); }

      }
      [/code]
      And when I do Player#Damage(1000), the event doesn't fire...
      A bug? Anyway I can bypass this?

      Console:
      [code]
      //Fall damage
      [23:11:14 INFO]: [nAPI] [DEBUG] IS PLAYER: true
      [23:11:14 INFO]: [nAPI] [DEBUG] WILL KILL: false
      //Kill command
      [23:11:20 INFO]: DeprecatedLuke issued command /pluginkilltest
      //EVENT NOT FIRED
      [23:11:20 INFO]: DeprecatedLuke died
      [/code]

            Unassigned Unassigned
            DeprecatedLuke Luke Kander
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: