diff --git a/src/main/java/com/songoda/epicanchors/tasks/AnchorTask.java b/src/main/java/com/songoda/epicanchors/tasks/AnchorTask.java index 0135946..c7226f6 100644 --- a/src/main/java/com/songoda/epicanchors/tasks/AnchorTask.java +++ b/src/main/java/com/songoda/epicanchors/tasks/AnchorTask.java @@ -72,7 +72,7 @@ public class AnchorTask extends BukkitRunnable { if (!randomTicksFailed) { try { NmsManager.getWorld().randomTickChunk(chunk, randomTicks); - } catch (NoSuchFieldException | IllegalAccessException ex) { + } catch (ReflectiveOperationException ex) { this.plugin.getLogger().log(Level.SEVERE, ex, () -> "Failed to do random ticks on this server implementation(/version) - " + "Skipping further random ticks."); @@ -84,7 +84,7 @@ public class AnchorTask extends BukkitRunnable { if (!spawnerTicksFailed) { try { NmsManager.getWorld().tickInactiveSpawners(chunk, TASK_INTERVAL); - } catch (NoSuchFieldException | IllegalAccessException ex) { + } catch (ReflectiveOperationException ex) { this.plugin.getLogger().log(Level.SEVERE, ex, () -> "Failed to do spawner ticks on this server implementation(/version) - " + "Skipping further spawner ticks.");