mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Player: Add typehint for maxDistance parameter of canInteract()
Not sure why this was missing :<
This commit is contained in:
parent
af7aef70db
commit
e5c58f9b04
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user