Use configured log prefix for spigot library loading (#7934)

This commit is contained in:
Jake Potrebic 2023-03-05 11:02:52 -08:00
parent ac1255aa58
commit 7fcf565d9c

View file

@ -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<Dependency> 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