Player: Add typehint for maxDistance parameter of canInteract()

Not sure why this was missing :<
This commit is contained in:
Dylan K. Taylor 2017-12-30 17:42:44 +00:00
parent af7aef70db
commit e5c58f9b04

View File

@ -1741,11 +1741,11 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
* Returns whether the player can interact with the specified position. This checks distance and direction. * Returns whether the player can interact with the specified position. This checks distance and direction.
* *
* @param Vector3 $pos * @param Vector3 $pos
* @param $maxDistance * @param float $maxDistance
* *
* @return bool * @return bool
*/ */
public function canInteract(Vector3 $pos, $maxDistance) : bool{ public function canInteract(Vector3 $pos, float $maxDistance) : bool{
$eyePos = $this->getPosition()->add(0, $this->getEyeHeight(), 0); $eyePos = $this->getPosition()->add(0, $this->getEyeHeight(), 0);
if($eyePos->distanceSquared($pos) > $maxDistance ** 2){ if($eyePos->distanceSquared($pos) > $maxDistance ** 2){
return false; return false;