Fixed a bug where an already closed gate got used for teleporting.
This commit is contained in:
parent
02b904a78d
commit
59fdb54a09
@ -25,7 +25,7 @@ public abstract class BaseLocationListener
|
|||||||
// Check if the gate is open and useable
|
// Check if the gate is open and useable
|
||||||
World gateWorld = g.getLocation().getWorld();
|
World gateWorld = g.getLocation().getWorld();
|
||||||
|
|
||||||
if (g.isOpen() == false || !gateWorld.equals(playerWorld)) {
|
if (!g.isOpen() || !gateWorld.equals(playerWorld)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,11 +37,12 @@ public abstract class BaseLocationListener
|
|||||||
// Check if the gate is still valid
|
// Check if the gate is still valid
|
||||||
try {
|
try {
|
||||||
g.validate();
|
g.validate();
|
||||||
|
|
||||||
gate = g;
|
gate = g;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
catch (Exception e2) {
|
catch (Exception e2) {
|
||||||
// do nothing - gate is closed
|
break; // do nothing - gate got closed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user