EntityDamageByEntityEvent Help Help

Discussion in 'Spigot Help' started by 0944831340, May 17, 2018.

  1. This is my code, When I attack the mob, it sends only one message, when I hold the diamond sword it sends twice the message, I hope you help, Thank!!

    Code (Text):
    public void onAttack(EntityDamageByEntityEvent event) {
            if (((event.getDamager() instanceof Player))){
            Player damager = (Player)event.getDamager();

    Attached Files:

  2. This also happened to me. Here: https://www.spigotmc.org/threads/wh...sage-twice-when-i-gave-it-only-1-time.252407/
    Solution: Stop your server and any other programs. Then when you shut it down, restart your computer and test it.

    It worked for me.
  3. Ok! Thank <3 Toldi
  4. Code (Text):
    (((event.getDamager() instanceof Player)))
    u dont need 3 brackets wtf..

Share This Page