Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
31 Zeilen
1.4 KiB
Diff
31 Zeilen
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sun, 31 May 2020 15:26:17 +0100
|
|
Subject: [PATCH] Provide a useful PluginClassLoader#toString
|
|
|
|
There are several cases where the plugin classloader may be dumped to the logs,
|
|
however, this provides no indication of the owner of the classloader, making
|
|
these messages effectively useless, this patch rectifies this
|
|
|
|
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
|
index 064c758b19bc8c9a4e94769dd205a1bdcc972a89..fc5dc3b2f73e76976748eb013b39cae931072143 100644
|
|
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
|
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
|
@@ -235,4 +235,16 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
|
javaPlugin.logger = this.logger; // Paper - set logger
|
|
javaPlugin.init(loader, loader.server, description, dataFolder, file, this);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public String toString() {
|
|
+ JavaPlugin currPlugin = plugin != null ? plugin : pluginInit;
|
|
+ return "PluginClassLoader{" +
|
|
+ "plugin=" + currPlugin +
|
|
+ ", pluginEnabled=" + (currPlugin == null ? "uninitialized" : currPlugin.isEnabled()) +
|
|
+ ", url=" + file +
|
|
+ '}';
|
|
+ }
|
|
+ // Paper end
|
|
}
|