summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <md_5@bigpond.com>2012-12-19 19:10:02 +1100
committerKHobbits <rob@khobbits.co.uk>2012-12-19 12:57:05 +0000
commite2e6bb38766e6547df4cabae4e170cc24f8df53f (patch)
treeb759a022259ee8a2b6e5db2a5c609c1802d2a8fc
parent9ba5f43315238795b2d3c25a306a2ad2f3b35a2f (diff)
downloadEssentials-e2e6bb38766e6547df4cabae4e170cc24f8df53f.tar
Essentials-e2e6bb38766e6547df4cabae4e170cc24f8df53f.tar.gz
Essentials-e2e6bb38766e6547df4cabae4e170cc24f8df53f.tar.lz
Essentials-e2e6bb38766e6547df4cabae4e170cc24f8df53f.tar.xz
Essentials-e2e6bb38766e6547df4cabae4e170cc24f8df53f.zip
Simply using the SnakeYaml default (which in turn defaults to Class.forName) appears to be enough to get the classes for our custom configuration. This avoid Bukkit depreciation.
-rw-r--r--Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java28
1 files changed, 2 insertions, 26 deletions
diff --git a/Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java b/Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java
index b6fbe3b33..e5fc19ea3 100644
--- a/Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java
+++ b/Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java
@@ -284,7 +284,8 @@ public class BukkitConstructor extends Constructor
final Field typeDefField = Constructor.class.getDeclaredField("typeDefinitions");
typeDefField.setAccessible(true);
typeDefinitions = (Map<Class<? extends Object>, TypeDescription>)typeDefField.get((Constructor)BukkitConstructor.this);
- if (typeDefinitions == null) {
+ if (typeDefinitions == null)
+ {
throw new NullPointerException();
}
}
@@ -402,29 +403,4 @@ public class BukkitConstructor extends Constructor
return object;
}
}
-
- @Override
- protected Class<?> getClassForNode(final Node node)
- {
- Class<?> clazz;
- final String name = node.getTag().getClassName();
- if (plugin == null)
- {
- clazz = super.getClassForNode(node);
- }
- else
- {
- final JavaPluginLoader jpl = (JavaPluginLoader)plugin.getPluginLoader();
- clazz = jpl.getClassByName(name);
- }
-
- if (clazz == null)
- {
- throw new YAMLException("Class not found: " + name);
- }
- else
- {
- return clazz;
- }
- }
}