Reset selector on error.

This commit is contained in:
Jesse Boyd 2017-03-25 05:31:13 +11:00
parent 48c6bfe21c
commit 06f61208f3
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -628,8 +628,12 @@ public class LocalSession {
*/
public RegionSelector getRegionSelector(World world) {
checkNotNull(world);
if (selector.getWorld() == null || !selector.getWorld().equals(world)) {
selector.setWorld(world);
try {
if (selector.getWorld() == null || !selector.getWorld().equals(world)) {
selector.setWorld(world);
selector.clear();
}
} catch (Throwable ignore) {
selector.clear();
}
return selector;