how can i check if there are players in my radius, like a PHP: public function checkRadius($player) So that later I can call it in my other function? How can i give the players in the radius something once I check. Thanks hopefully I explained it more descriptive than before!
You should do radius($player,$range) so $players foreach $player->getviewers as $other if ($dist = $player->distance($other)) >= $range $players[$dist][] = $player OR foreach $player->getlevel->getplayers() ... depending on the range as getviewers probably wont be so long ranged but is optimal for shortranges
PHP: public function contains($x, $y, $z, $x1, $y1, $z1, Vector3 $pos) { $axis = new AxisAlignedBB($x, $y, $z, $x1, $y1, $z1); if ($axis->isVectorInside($pos)) { return true; } return false; }