Open dktapps opened 6 years ago
Not sure if this is related but a player noticed that when dying in any world via void(only been tested with void) the player respawns at hub in Creative mode, bypassing the set Survival GM in world config.
Unfortunately, many players know about this bug. Any ideas how to fix it?
@zKoz210 that's the whole purpose of opening an issue - to know if someone has a good solution :p
I'm also having problems with this and I lost a whole afternoon figuring out what's wrong until I remembered this issue. It's quite serious and needs a solution soon.
public function onPlayerQuit(\pocketmine\event\player\PlayerQuitEvent $event){
$player = $event->getPlayer();
if($player->getName() == "XxKenyGamerxX"){
$player->kill();
}
}
@kenygamer assuming you mean that the items are still there, use
$player->kill();
$player->save();
as a workaround
@jojoe77777 Not working.
Should this fix the issue I was having?
@kenygamer it fixes the exploits related to this issue, yes. The problem described in this issue still applies, but players can't exploit respawn loopholes to take advantage of it anymore.
Issue description
Players can quit to title on death instead of respawning, and thereby evade things that should be done on respawn, such as removing effects, resetting hunger, resetting health, XP, etc etc...