PocketMine-MP 5.42.2 git-40e2639b20bdc4ddba49d9f7f5fa0d5e92aa266f
Loading...
Searching...
No Matches
pocketmine\item\Releasable Interface Reference
+ Inheritance diagram for pocketmine\item\Releasable:
+ Collaboration diagram for pocketmine\item\Releasable:

Public Member Functions

 canStartUsingItem (Player $player)
 

Detailed Description

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.

See also
Player::isUsingItem()
Player::getItemUseDuration()

Definition at line 36 of file Releasable.php.

Member Function Documentation

◆ canStartUsingItem()

pocketmine\item\Releasable::canStartUsingItem ( Player $player)

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.

Implemented in pocketmine\item\Bow, pocketmine\item\Food, pocketmine\item\GoatHorn, pocketmine\item\Medicine, pocketmine\item\MilkBucket, pocketmine\item\Potion, pocketmine\item\Spyglass, and pocketmine\item\Trident.


The documentation for this interface was generated from the following file: