Merge branch '3.6'

This commit is contained in:
Dylan K. Taylor 2019-02-27 10:19:58 +00:00
commit 9b3230aa9c

View File

@ -3007,7 +3007,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
} }
if($this->inventory !== null){ if($this->inventory !== null){
$this->inventory->setHeldItemIndex(0, false); //This is already handled when sending contents, don't send it twice $this->inventory->setHeldItemIndex(0);
$this->inventory->clearAll(); $this->inventory->clearAll();
} }
if($this->armorInventory !== null){ if($this->armorInventory !== null){
@ -3015,6 +3015,10 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
} }
} }
//TODO: allow this number to be manipulated during PlayerDeathEvent
$this->level->dropExperience($this, $this->getXpDropAmount());
$this->setXpAndProgress(0, 0);
if($ev->getDeathMessage() != ""){ if($ev->getDeathMessage() != ""){
$this->server->broadcastMessage($ev->getDeathMessage()); $this->server->broadcastMessage($ev->getDeathMessage());
} }