Fixed stupid bug letting the closest gate method fail.

This commit is contained in:
Tobias Ottenweller 2013-02-17 19:39:15 +01:00
parent 9ce65ed26d
commit 02262880da

View File

@ -25,6 +25,7 @@ public class GateUtil
if (tempDist < minmalDist)
{
gate = g;
minmalDist = tempDist;
}
}
@ -42,8 +43,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())
{
if (gate != null)
@ -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();