mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-09-27 14:12:59 +02:00
Hid an unavoidable rare error.
This commit is contained in:
parent
1940dfc8c0
commit
17eb90e5ea
@ -353,12 +353,17 @@ public class StackingTask extends BukkitRunnable {
|
||||
List<LivingEntity> entities = new ArrayList<>();
|
||||
for (CachedChunk chunk : getNearbyChunks(location, radius, singleChunk)) {
|
||||
if (chunk == null) continue;
|
||||
Entity[] entityArray;
|
||||
Entity[] entityArray = new Entity[0];
|
||||
if (cachedChunks.containsKey(chunk)) {
|
||||
entityArray = cachedChunks.get(chunk);
|
||||
} else {
|
||||
entityArray = chunk.getEntities();
|
||||
cachedChunks.put(chunk, entityArray);
|
||||
try {
|
||||
entityArray = chunk.getEntities();
|
||||
cachedChunks.put(chunk, entityArray);
|
||||
} catch (Exception ignored) {
|
||||
// Sometimes accessing this method asynchronously throws an error. This is super rare and
|
||||
// as such doesn't really affect the plugin so we're just going to ignore this failure.
|
||||
}
|
||||
}
|
||||
if (entityArray == null) continue;
|
||||
for (Entity e : entityArray) {
|
||||
|
Loading…
Reference in New Issue
Block a user