2013-04-03 15:20:29 +08:00
From d2e1a053d9ef3a7631a44c7cca6cca67a0f8ec13 Mon Sep 17 00:00:00 2001
2013-02-02 13:41:52 +08:00
From: md_5 <md_5@live.com.au>
Date: Sat, 2 Feb 2013 16:40:42 +1100
Subject: [PATCH] Add nag for bad plugins.
---
2013-04-03 15:20:29 +08:00
.../org/bukkit/plugin/java/PluginClassLoader.java | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
2013-02-02 13:41:52 +08:00
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
2013-02-02 15:11:59 +08:00
index 29ec3fc..a31500c 100644
2013-02-02 13:41:52 +08:00
--- 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
2013-02-02 15:11:59 +08:00
+ if (checkGlobal && name.equals("org.mcstats.Metrics")) {
2013-02-02 13:41:52 +08:00
+ 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-04-03 15:20:29 +08:00
1.7.0.4
2013-02-02 13:41:52 +08:00