Skip to content

Lever ​

class · pocketmine\block\Lever · source

Extends Flowable

Properties ​

$activated protected ​

php
protected bool $activated

$facing protected ​

php
protected \pocketmine\block\utils\LeverFacing $facing

Methods ​

describeBlockOnlyState() protected ​

php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : void

getFacing() ​

php
public function getFacing() : \pocketmine\block\utils\LeverFacing

getStrongPower() 5.46.0 ​

php
public function getStrongPower(int $face) : int

getSupportFace() 5.46.0 ​

php
public function getSupportFace() : int

Returns the side of the lever where the block it is attached to is.

getWeakPower() 5.46.0 ​

php
public function getWeakPower(int $face) : int

isActivated() ​

php
public function isActivated() : bool

isRedstoneSource() 5.46.0 ​

php
public function isRedstoneSource() : bool

onBreak() 5.46.0 ​

php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onInteract() ​

php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onNearbyBlockChange() ​

php
public function onNearbyBlockChange() : void

place() ​

php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : bool

setActivated() ​

php
public function setActivated(bool $activated) : self

setFacing() ​

php
public function setFacing(\pocketmine\block\utils\LeverFacing $facing) : self

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.