meta = $meta; $this->isActivable = true; $this->maxStackSize = 1; } public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ if($this->meta === AIR){ if($target instanceof LiquidBlock){ $level->setBlock($target, new AirBlock()); if(($player->gamemode & 0x01) === 0){ $this->meta = ($target instanceof WaterBlock) ? WATER:LAVA; } return true; } }elseif($this->meta === WATER){ if($block->getID() === AIR){ $level->setBlock($block, new StillWaterBLock()); if(($player->gamemode & 0x01) === 0){ $this->meta = 0; } return true; } }elseif($this->meta === LAVA){ if($block->getID() === AIR){ $level->setBlock($block, new StillLavaBlock()); if(($player->gamemode & 0x01) === 0){ $this->meta = 0; } return true; } } return false; } }