mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-24 18:09:41 -05:00
1 parent
0bc50733b5
commit
d03379a043
1 file changed
+3
-1
@@ -373,8 +373,10 @@ public class Location implements Cloneable {
|
||||
*/
|
||||
public double distanceSquared(Location o) {
|
||||
if (o == null) {
|
||||
throw new IllegalArgumentException("Cannot measure distance to a null location");
|
||||
} else if (o.getWorld() == null || getWorld() == null) {
|
||||
throw new IllegalArgumentException("Cannot measure distance to a null world");
|
||||
} else if (o == null || o.getWorld() != getWorld()) {
|
||||
} else if (o.getWorld() != getWorld()) {
|
||||
throw new IllegalArgumentException("Cannot measure distance between " + getWorld().getName() + " and " + o.getWorld().getName());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user