mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +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{
|
public function getXpDropAmount() : int{
|
||||||
if(!$this->isCreative()){
|
if(!$this->isCreative()){
|
||||||
return min(100, $this->getCurrentTotalXp());
|
return parent::getXpDropAmount();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -459,6 +459,9 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
|||||||
$this->xpCooldown = $value;
|
$this->xpCooldown = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getXpDropAmount() : int{
|
||||||
|
return (int) min(100, $this->getCurrentTotalXp());
|
||||||
|
}
|
||||||
|
|
||||||
public function getInventory(){
|
public function getInventory(){
|
||||||
return $this->inventory;
|
return $this->inventory;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user