Skip to content

Releasable ​

interface · pocketmine\item\Releasable · source

Implemented by items which can be used by pressing and holding the "use item" button in-game. The player's arm will appear to be raised and the "using item" flag will be set. Examples of this type of behaviour include bows, food and spyglasses.

Methods ​

canStartUsingItem() ​

php
public function canStartUsingItem(\pocketmine\player\Player $player) : bool

Returns whether the player can currently trigger the press-and-hold behaviour of the item. For example, bows return whether the player has an arrow that can be fired.

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