mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Fix radius world check
This commit is contained in:
1 parent
4a71b5926e
commit
fee701bb5a
1 file changed
+5
-4
@@ -63,11 +63,12 @@ public class RadiusListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (audience instanceof CarbonPlayer carbonPlayer) {
|
if (audience instanceof CarbonPlayer carbonPlayer) {
|
||||||
if (event.sender().sameWorldAs(carbonPlayer)) {
|
if (!event.sender().sameWorldAs(carbonPlayer)) {
|
||||||
final double distance = carbonPlayer.distanceSquaredFrom(event.sender());
|
return true;
|
||||||
|
|
||||||
return distance > (radius * radius);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final double distance = carbonPlayer.distanceSquaredFrom(event.sender());
|
||||||
|
return distance > (radius * radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in new issue
Block a user