Merge branch 'php/7.0' into mcpe-1.2

This commit is contained in:
Dylan K. Taylor
2017-09-02 18:29:53 +01:00
6 changed files with 107 additions and 49 deletions

View File

@ -833,8 +833,22 @@ class Item implements ItemIds, \JsonSerializable{
return false;
}
/**
* Called when a player uses the item on air, for example throwing a projectile.
* Returns whether the item was changed, for example count decrease or durability change.
*
* @param Player $player
* @param Vector3 $directionVector
*
* @return bool
*/
public function onClickAir(Player $player, Vector3 $directionVector) : bool{
return false;
}
/**
* Called when a player is using this item and releases it. Used to handle bow shoot actions.
* Returns whether the item was changed, for example count decrease or durability change.
*
* @param Player $player
* @return bool