Fix SysoutCatcher when plugins log before initialisation (Fixes #6323)
This commit is contained in:
@ -58,7 +58,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ plugin.getDescription().getAuthors(),
|
+ plugin.getDescription().getAuthors(),
|
||||||
+ plugin.getName())
|
+ 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
|
+ // 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
|
+ // Just print out normally, with some added information
|
||||||
+ Bukkit.getLogger().log(this.level, String.format("[%s] %s %s", this.prefix, clazz.getName(), line));
|
+ Bukkit.getLogger().log(this.level, String.format("[%s] %s %s", this.prefix, clazz.getName(), line));
|
||||||
|
|||||||
Reference in New Issue
Block a user