diff --git a/src/de/craftinc/gates/util/SimpleLocation.java b/src/de/craftinc/gates/util/SimpleLocation.java index 3a99cf5..d80f61e 100644 --- a/src/de/craftinc/gates/util/SimpleLocation.java +++ b/src/de/craftinc/gates/util/SimpleLocation.java @@ -13,9 +13,12 @@ public class SimpleLocation public SimpleLocation(Location l) { this.world = l.getWorld().getName(); - this.x = (int)l.getX(); - this.y = (int)l.getY(); - this.z = (int)l.getZ(); + + // Using Block coordinates makes it possible to compare block locations with player locations. + // There might be an offset of 1 otherwise. + this.x = l.getBlockX(); + this.y = l.getBlockY(); + this.z = l.getBlockZ(); }