From 02a0fb4f81d73b78a50e0288ce881a79666984da Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Tue, 8 Jan 2013 22:57:48 +1100 Subject: Fix deprecation nag exception --- Essentials/src/net/ess3/storage/BukkitConstructor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Essentials/src/net/ess3/storage/BukkitConstructor.java b/Essentials/src/net/ess3/storage/BukkitConstructor.java index 32bf5fc76..819fe4b81 100644 --- a/Essentials/src/net/ess3/storage/BukkitConstructor.java +++ b/Essentials/src/net/ess3/storage/BukkitConstructor.java @@ -426,7 +426,14 @@ public class BukkitConstructor extends Constructor } else { - clazz = plugin.getClassByName(name); + try // TODO Is there a better way to to this? + { + clazz = plugin.getClass().getClassLoader().loadClass(name); + } + catch (Exception e) + { + clazz = null; + } } if (clazz == null) -- cgit v1.2.3