exception handling in player listener
This commit is contained in:
parent
7f2c85e5cc
commit
107de7551c
@ -131,11 +131,15 @@ public class PluginPlayerListener implements Listener
|
||||
|
||||
if (locationsAreAtSamePositions(l, blockTo.getLocation()) || locationsAreAtSamePositions(l, blockToUp.getLocation())) {
|
||||
// Check if the gate is still valid
|
||||
g.validate();
|
||||
|
||||
if (g.isOpen()) {
|
||||
try {
|
||||
g.validate();
|
||||
gate = g;
|
||||
break;
|
||||
}
|
||||
catch (Exception e2) {
|
||||
System.out.println("gate is not valid");
|
||||
|
||||
// do nothing - gate is closed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user