Solved LastDamager in PlayerMoveEvent

Discussion in 'Plugin Development' started by MiBB3L, Mar 30, 2021.

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

    MiBB3L

    I have a PlayerMoveEvent where I check if a player is below Y 50, if so I teleport them back to spawn. Now I want to get the "killer" of the person, who knocks them of the platform. Therefore I did this in my PlayJoinEvent
    Code:
    Player killer = (Player) player.getLastDamageCause().getEntity();
    But Iam just getting the player who gets attacked and not the actual attacker
     
  2. Offline

    KarimAKL

Thread Status:
Not open for further replies.

Share This Page