From 02262880da78c0e5a0fc5115f81a298b559114e7 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Sun, 17 Feb 2013 19:39:15 +0100 Subject: [PATCH] Fixed stupid bug letting the closest gate method fail. --- src/de/craftinc/gates/util/GateUtil.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/de/craftinc/gates/util/GateUtil.java b/src/de/craftinc/gates/util/GateUtil.java index cc45921..168fdb9 100644 --- a/src/de/craftinc/gates/util/GateUtil.java +++ b/src/de/craftinc/gates/util/GateUtil.java @@ -25,6 +25,7 @@ public class GateUtil if (tempDist < minmalDist) { gate = g; + minmalDist = tempDist; } } @@ -41,8 +42,6 @@ public class GateUtil // players are sometime stuck into the ground Location locationUp = location.getBlock().getRelative(BlockFace.UP).getLocation(); - - System.out.println("player location: " + location); for (Gate g : Gate.getAll()) { @@ -65,8 +64,6 @@ public class GateUtil if (LocationUtil.locationsAreAtSamePositions(l, location) || LocationUtil.locationsAreAtSamePositions(l, locationUp)) { - System.out.println("gate location: " + l); - // Check if the gate is still valid try { g.validate();