Fix checking distance to another player in another world

This commit is contained in:
Teriuihi 2022-02-26 02:26:07 +01:00
parent e48d7c97c9
commit 295b9d1ee2

View File

@ -35,7 +35,8 @@ public class Frame {
return false; return false;
if (!playerSettings.isSeeingParticles()) if (!playerSettings.isSeeingParticles())
return false; return false;
return player.getLocation().distance(location) < 100; Location playerLocation = player.getLocation();
return location.getWorld().getUID().equals(playerLocation.getWorld().getUID()) && player.getLocation().distance(location) < 100;
}).collect(Collectors.toList()) }).collect(Collectors.toList())
) )
.spawn(); .spawn();