mirror of
https://github.com/songoda/EpicAnchors.git
synced 2024-11-23 02:25:23 +01:00
Reduce console spam in Minecraft 1.19.3 when manually ticking via NMS
NoSuchMethod is now a possible problem - This change makes sure that any failed reflection access/modification is caught and further calls skipped
This commit is contained in:
parent
4d24e0a954
commit
327c259e65
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user