mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
@ -40,6 +40,7 @@ class PlayerDeathEvent extends EntityDeathEvent{
|
||||
|
||||
private Translatable|string $deathMessage;
|
||||
private bool $keepInventory = false;
|
||||
private bool $keepXp = false;
|
||||
|
||||
/**
|
||||
* @param Item[] $drops
|
||||
@ -78,6 +79,14 @@ class PlayerDeathEvent extends EntityDeathEvent{
|
||||
$this->keepInventory = $keepInventory;
|
||||
}
|
||||
|
||||
public function getKeepXp() : bool{
|
||||
return $this->keepXp;
|
||||
}
|
||||
|
||||
public function setKeepXp(bool $keepXp) : void{
|
||||
$this->keepXp = $keepXp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the vanilla death message for the given death cause.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user