mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Move XP drop amount to Human instead of Player
This commit is contained in:
parent
03fda936a8
commit
b6c1124d50
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user