Move XP drop amount to Human instead of Player

This commit is contained in:
Dylan K. Taylor 2018-01-05 12:09:24 +00:00
parent 03fda936a8
commit b6c1124d50
2 changed files with 4 additions and 1 deletions

View File

@ -1435,7 +1435,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
public function getXpDropAmount() : int{
if(!$this->isCreative()){
return min(100, $this->getCurrentTotalXp());
return parent::getXpDropAmount();
}
return 0;

View File

@ -459,6 +459,9 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
$this->xpCooldown = $value;
}
public function getXpDropAmount() : int{
return (int) min(100, $this->getCurrentTotalXp());
}
public function getInventory(){
return $this->inventory;