Fix the error when trying to measure difference between two worlds.
This commit is contained in:
parent
86082e2f63
commit
d034a0f1ed
@ -374,7 +374,7 @@ public class Jail {
|
||||
* @return Distance between the location provided and the teleport in location.
|
||||
*/
|
||||
public double getDistance(Location loc) {
|
||||
if (loc.getWorld().getName().equalsIgnoreCase(getTeleportIn().getWorld().getName())) return (double) Integer.MAX_VALUE;
|
||||
if (!loc.getWorld().getName().equalsIgnoreCase(getTeleportIn().getWorld().getName())) return (double) Integer.MAX_VALUE;
|
||||
else return loc.distance(getTeleportIn());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user