set up dependency stuff

This commit is contained in:
dfsek
2021-02-20 22:31:13 -07:00
parent 76f2a3fbc4
commit 45dbe45fb4
9 changed files with 144 additions and 36 deletions

View File

@@ -141,7 +141,12 @@ public class TerraBukkitPlugin extends JavaPlugin implements TerraPlugin {
LangUtil.load(config.getLanguage(), this); // Load language.
debugLogger.setDebug(isDebug());
addonRegistry.loadAll();
if(!addonRegistry.loadAll()) {
getLogger().severe("Failed to load addons. Please correct addon installations to continue.");
Bukkit.getPluginManager().disablePlugin(this);
return;
}
registry.loadAll(this); // Load all config packs.
PluginCommand c = Objects.requireNonNull(getCommand("terra"));

View File

@@ -41,7 +41,7 @@ public final class SerializationUtil {
try {
if(result.getName().contains(oldNameSpace)) {
String newClassName = result.getName().replace(oldNameSpace, newNameSpace);
Class localClass = Class.forName(newClassName);
Class<?> localClass = Class.forName(newClassName);
Field nameField = ObjectStreamClass.class.getDeclaredField("name");
nameField.setAccessible(true);