From 71031d0578447234fae412040317f76f13dc48be Mon Sep 17 00:00:00 2001 From: Paul Schulze Date: Mon, 13 May 2013 17:48:09 +0200 Subject: [PATCH] Fixed bug: When x or z was negative a player was teleported one block beside the real portal blocks. --- src/de/craftinc/gates/util/LocationUtil.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/de/craftinc/gates/util/LocationUtil.java b/src/de/craftinc/gates/util/LocationUtil.java index b8fb9f0..e04412f 100644 --- a/src/de/craftinc/gates/util/LocationUtil.java +++ b/src/de/craftinc/gates/util/LocationUtil.java @@ -2,7 +2,6 @@ package de.craftinc.gates.util; import java.util.HashMap; import java.util.Map; - import org.bukkit.Location; import org.bukkit.World; @@ -90,13 +89,13 @@ public class LocationUtil if (l1.getWorld() != l2.getWorld() && (l1.getWorld() == null || !l1.getWorld().equals(l2.getWorld()))) { return false; } - if (new Double(l1.getX()).longValue() != new Double(l2.getX()).longValue()) { + if (l1.getBlockX() != l2.getBlockX()) { return false; } - if (new Double(l1.getY()).longValue() != new Double(l2.getY()).longValue()) { + if (l1.getBlockY() != l2.getBlockY()) { return false; } - if (new Double(l1.getZ()).longValue() != new Double(l2.getZ()).longValue()) { + if (l1.getBlockZ() != l2.getBlockZ()) { return false; }