mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-28 03:09:14 +00:00
Merge branch 'master' of https://gitlab.com/SamB440/rpgregions-2
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user