Fixed items being consumed on CREATIVE mode

This commit is contained in:
Shoghi Cervantes 2013-06-07 20:02:25 +02:00
parent 6fa0ef652e
commit 9d1369bfe9
7 changed files with 30 additions and 11 deletions

View file

@ -55,7 +55,9 @@ class SaplingBlock extends FlowableBlock{
public function onActivate(Item $item, Player $player){
if($item->getID() === DYE and $item->getMetadata() === 0x0F){ //Bonemeal
TreeObject::growTree($this->level, $this, new Random(), $this->meta & 0x03);
$item->count--;
if(($player->gamemode & 0x01) === 0){
$item->count--;
}
return true;
}
return false;