From 06a831d4772abce22e35b811b81c48f7e1db1c44 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 4 Aug 2021 04:04:12 +0100 Subject: [PATCH] Fix SysoutCatcher when plugins log before initialisation (Fixes #6323) --- patches/server/Add-System.out.println-catcher.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/Add-System.out.println-catcher.patch b/patches/server/Add-System.out.println-catcher.patch index 10e3f49ae9..1e9ecb3f25 100644 --- a/patches/server/Add-System.out.println-catcher.patch +++ b/patches/server/Add-System.out.println-catcher.patch @@ -58,7 +58,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + plugin.getDescription().getAuthors(), + plugin.getName()) + ); -+ } catch (final IllegalArgumentException e) { ++ } catch (final IllegalArgumentException | IllegalStateException e) { + // If anything happens, the calling class doesn't exist, there is no JavaPlugin that "owns" the calling class, etc + // Just print out normally, with some added information + Bukkit.getLogger().log(this.level, String.format("[%s] %s %s", this.prefix, clazz.getName(), line));