From 7fcf565d9c657c8e2f09ccee774c4f9008cd8410 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sun, 5 Mar 2023 11:02:52 -0800 Subject: [PATCH] Use configured log prefix for spigot library loading (#7934) --- patches/api/Paper-Plugins.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/patches/api/Paper-Plugins.patch b/patches/api/Paper-Plugins.patch index 2d51ba3c24..bbe281c5ff 100644 --- a/patches/api/Paper-Plugins.patch +++ b/patches/api/Paper-Plugins.patch @@ -2013,6 +2013,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 { private final Logger logger; +@@ -0,0 +0,0 @@ class LibraryLoader + } + logger.log( Level.INFO, "[{0}] Loading {1} libraries... please wait", new Object[] + { +- desc.getName(), desc.getLibraries().size() ++ java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), desc.getLibraries().size() // Paper - use configured log prefix + } ); + + List dependencies = new ArrayList<>(); +@@ -0,0 +0,0 @@ class LibraryLoader + jarFiles.add( url ); + logger.log( Level.INFO, "[{0}] Loaded library {1}", new Object[] + { +- desc.getName(), file ++ java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), file // Paper - use configured log prefix + } ); + } + diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java