mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +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.
|
||||
*
|
||||
* @param Vector3 $pos
|
||||
* @param $maxDistance
|
||||
* @param float $maxDistance
|
||||
*
|
||||
* @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);
|
||||
if($eyePos->distanceSquared($pos) > $maxDistance ** 2){
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user