mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +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 (event.sender().sameWorldAs(carbonPlayer)) {
|
||||
final double distance = carbonPlayer.distanceSquaredFrom(event.sender());
|
||||
|
||||
return distance > (radius * radius);
|
||||
if (!event.sender().sameWorldAs(carbonPlayer)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final double distance = carbonPlayer.distanceSquaredFrom(event.sender());
|
||||
return distance > (radius * radius);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user