Fix the error when trying to measure difference between two worlds.

This commit is contained in:
graywolf336 2014-07-15 00:19:13 -05:00
parent 86082e2f63
commit d034a0f1ed

View File

@ -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());
}