Closed Bermiin closed 1 year ago
SP listens to PlayerDeathEvent so I think Player#setHealth(0)
should work, it's same as if someone killed them with a sword, or I do not see any reason why it wouldn't :thinking:
Currently, the behavior whether they are teleported depends on the kit, that was a bit stupid decision tbh (i.e., in parkour you win without the other player being killed).
You should be able to just call #forceWinFight
and api.clear(player, true, true)
I'll have a better look at some point (or maybe).
Let me know if that's enough.
Thats weird, Its like something is preventing the player from being teleported back to spawn. Im currently using StrikePracticeAPI#forceWinFight(player)
and right after that im calling StrikePracticeAPI#clear(player, true, true)
. Both players get normally teleported to spawn when normally killed using sword. Only when doing it through API it does not work.
Plugins: StrikeSurrender, ViaVersion, PlaceholderAPI, ProtocolLib, LuckPerms, Vault, StrikePractice
Version: 1.8.8 Paper (not fork)
Check if just player#teleport
works. Also, /sprac debug
may show if something's preventing teleportation
I assume this was solved somehow(?), closing
Describe the bug When you force win the player using
StrikePracticeAPI#forceWinRound
orStrikePracticeAPI#forceWinFight
or you kill them usingPlayer#setHealth(0)
, then the force-won or killed player does not get teleported to lobby and stays in the arenaTo Reproduce Steps to reproduce the behavior:
Expected behavior Both players should be teleported to lobby
Errors and console logs StrikePractice debug logs: https://gist.github.com/Bermiin/1c3a6b4eaab983d9de64c7dfef19dd1c
Versions: