Solved Player immediately goes into spectator after taking damage rather than death

Discussion in 'Plugin Development' started by voltywolty, Dec 31, 2023.

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

    voltywolty

    So I have an EntityDamageEvent and an EntityDamageByEntityEvent where if the damage taken to the player is more than their health, they instantly get thrown into spectator mode rather than dying. However, for some reason it isn't working now.

    Due to the length of the code, I will post this using hastebin. It's a lot to deal with, but I'm not too sure what is causing the issue because it's worked in the past before with 1.17. Not too sure what it could be, but I think it's because the function is reading the damage wrong?

    https://hastebin.skyra.pw/otidivigaj.kotlin
     
  2. Offline

    KarimAKL

  3. Offline

    voltywolty

    Ah I see, must've changed since 1.17. I will try and use that and see if it works!
     
    KarimAKL likes this.
  4. Offline

    KarimAKL

Thread Status:
Not open for further replies.

Share This Page