From ac2908b781fe1e52cf7a4546b3aca291c6ce267d Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 27 Dec 2012 10:36:10 -0600 Subject: [PATCH] Use correct warning in JavaPluginLoader. Fixes BUKKIT-3315 The warning message printed with the stack traces on the deprecated methods mistakingly use the wrong method signature in the description. By: Wesley Wolfe --- .../main/java/org/bukkit/plugin/java/JavaPluginLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index c90056d478..10fc26aed1 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -281,7 +281,7 @@ public class JavaPluginLoader implements PluginLoader { @Deprecated public Class getClassByName(final String name) { if (warn) { - server.getLogger().log(Level.WARNING, "Method \"public Plugin loadPlugin(File, boolean)\" is Deprecated, and may be removed in a future version of Bukkit", new AuthorNagException("")); + server.getLogger().log(Level.WARNING, "Method \"public Class getClassByName(String)\" is Deprecated, and may be removed in a future version of Bukkit", new AuthorNagException("")); warn = false; } return getClassByName0(name); @@ -313,7 +313,7 @@ public class JavaPluginLoader implements PluginLoader { @Deprecated public void setClass(final String name, final Class clazz) { if (warn) { - server.getLogger().log(Level.WARNING, "Method \"public Plugin loadPlugin(File, boolean)\" is Deprecated, and may be removed in a future version of Bukkit", new AuthorNagException("")); + server.getLogger().log(Level.WARNING, "Method \"public void setClass(String, Class)\" is Deprecated, and may be removed in a future version of Bukkit", new AuthorNagException("")); warn = false; } setClass0(name, clazz);