diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 6d408aa8d..b5d4de200 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1053,6 +1053,22 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $this->dataPacket($pk); } + public function isCreative(){ + return ($this->gamemode & 0x01) > 0; + } + + public function isAdventure(){ + return ($this->gamemode & 0x02) > 0; + } + + public function getDrops(){ + if(!$this->isCreative()){ + return parent::getDrops(); + } + + return []; + } + protected function getCreativeBlock(Item $item){ foreach(Block::$creative as $i => $d){ if($d[0] === $item->getID() and $d[1] === $item->getDamage()){