$player->kick() I've had some issues with that. I still don't know if it's pmmp or not Without plugins I get an error about droppingxp on null and when there is a world management plugin, itd about game rules Is there a way to kick a player on deathevent without ->kick()?
Don't kick players during events. This is a well-documented bug that's slated to be fixed in 4.0. https://github.com/pmmp/PocketMine-MP/issues/1239
i'm not sure but I think the event will do actions with the player in the next tick, so you need to kick the player in the next tick, you can schedule a delayed task and use a ClosureTask class
No, but I found a hacky solution, I moved the kick on respawn event...Ik I shouldn't but it will be like that until 4.0.0 and anyway, I get no error anymore