3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00
Paper/Bukkit-Patches/0004-Add-nag-for-bad-plugins.patch

31 Zeilen
1.2 KiB
Diff

2013-03-20 22:54:12 +01:00
From 767ad529f592e2721f2df2c14f533317eab3ff7c Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 2 Feb 2013 16:40:42 +1100
Subject: [PATCH] Add nag for bad plugins.
---
src/main/java/org/bukkit/plugin/java/PluginClassLoader.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 29ec3fc..a31500c 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -69,6 +69,13 @@ public class PluginClassLoader extends URLClassLoader {
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
throw new ClassNotFoundException(name);
}
+
+ // Spigot start
+ if (checkGlobal && name.equals("org.mcstats.Metrics")) {
+ loader.server.getLogger().warning("Plugin from file: " + getURLs()[0] + " has embedded Metrics in the default package. This is not advisable, go nag them!");
+ }
+ // Spigot end
+
Class<?> result = classes.get(name);
if (result == null) {
--
2013-03-20 22:54:12 +01:00
1.8.2