Extract an ExperienceManager unit from Human

This commit is contained in:
Dylan K. Taylor
2019-07-06 19:31:39 +01:00
parent da0358529a
commit 5274a0fe3c
5 changed files with 366 additions and 275 deletions

View File

@ -2363,7 +2363,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
}
$this->world->dropExperience($this, $ev->getXpDropAmount());
$this->setXpAndProgress(0, 0);
$this->xpManager->setXpAndProgress(0, 0.0);
if($ev->getDeathMessage() != ""){
$this->server->broadcastMessage($ev->getDeathMessage());