Fix some command parsing issues

Tab complete runs on main thread - that could be an issue
This commit is contained in:
Jesse Boyd
2018-08-17 20:13:33 +10:00
parent 43d5459595
commit ae65708d82
5 changed files with 71 additions and 7 deletions

View File

@ -307,8 +307,15 @@ public class BukkitQueue_All extends BukkitQueue_0<ChunkSnapshot, ChunkSnapshot,
private ChunkSnapshot tryGetSnasphot(Chunk chunk) {
try {
return chunk.getChunkSnapshot(false, true, false);
} catch (IllegalStateException ignore) {
return null;
} catch (Throwable ignore) {
Throwable cause = ignore;
while (cause.getCause() != null) {
cause = cause.getCause();
}
if (cause instanceof IllegalStateException) {
return null;
}
throw ignore;
}
}