9
0
mirror of https://gitlab.com/SamB440/rpgregions-2.git synced 2025-12-28 03:09:14 +00:00
This commit is contained in:
SamB440
2020-06-26 19:51:11 +01:00

View File

@@ -23,6 +23,12 @@ public enum IntegrationType {
RPGRegions plugin = JavaPlugin.getPlugin(RPGRegions.class);
if (plugin.getManagers() != null && plugin.getManagers().getIntegrationManager() != null) throw new UnsupportedOperationException("IntegrationManager already loaded");
plugin.getLogger().info("Loading IntegrationManager implementation...");
if (Bukkit.getPluginManager().getPlugin(path.split(".")[0]) == null) {
plugin.getLogger().severe("Unable to load IntegrationManager. The rquested plugin is not enabled.");
Bukkit.getPluginManager().disablePlugin(plugin);
return Optional.empty();
}
Class<? extends IntegrationManager> clazz = (Class<? extends IntegrationManager>) Class
.forName("net.islandearth.rpgregions.api.integrations." + path);
IntegrationManager generatedClazz = null;