mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-06-26 14:45:07 +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<>();
|
List<LivingEntity> entities = new ArrayList<>();
|
||||||
for (CachedChunk chunk : getNearbyChunks(location, radius, singleChunk)) {
|
for (CachedChunk chunk : getNearbyChunks(location, radius, singleChunk)) {
|
||||||
if (chunk == null) continue;
|
if (chunk == null) continue;
|
||||||
Entity[] entityArray;
|
Entity[] entityArray = new Entity[0];
|
||||||
if (cachedChunks.containsKey(chunk)) {
|
if (cachedChunks.containsKey(chunk)) {
|
||||||
entityArray = cachedChunks.get(chunk);
|
entityArray = cachedChunks.get(chunk);
|
||||||
} else {
|
} else {
|
||||||
entityArray = chunk.getEntities();
|
try {
|
||||||
cachedChunks.put(chunk, entityArray);
|
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;
|
if (entityArray == null) continue;
|
||||||
for (Entity e : entityArray) {
|
for (Entity e : entityArray) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user