9
0
mirror of https://gitlab.com/SamB440/rpgregions-2.git synced 2026-01-04 15:31:38 +00:00

Deprecate RPGRegions integration in favour of Orbis

This commit is contained in:
SamB440
2025-09-01 18:31:06 +01:00
parent 5a807aa8b0
commit b426673587
2 changed files with 10 additions and 1 deletions

View File

@@ -28,10 +28,18 @@ public enum IntegrationType {
public Optional<IntegrationManager> get(IRPGRegionsAPI plugin) throws ClassNotFoundException {
if (plugin.getManagers() != null && plugin.getManagers().getIntegrationManager() != null) throw new UnsupportedOperationException("IntegrationManager already loaded");
plugin.getLogger().info("Loading IntegrationManager implementation...");
if (!this.plugin.equals("RPGRegions") && Bukkit.getPluginManager().getPlugin(this.plugin) == null) {
if (this != RPGREGIONS && Bukkit.getPluginManager().getPlugin(this.plugin) == null) {
return Optional.empty();
}
if (this == RPGREGIONS) {
plugin.getLogger().warning("The RPGRegions integration has been deprecated and will not receive updates.");
plugin.getLogger().warning("You are instead recommended to use the Orbis integration.");
plugin.getLogger().warning("Find download options for Orbis at: https://github.com/EmpireWar/Orbis?tab=readme-ov-file#-downloads.");
plugin.getLogger().warning("Migration tutorial can be found at: https://github.com/EmpireWar/Orbis/wiki/Migration-from-another-plugin.");
plugin.getLogger().warning("Orbis has better performance and more features and is maintained by me directly.");
}
Class<? extends IntegrationManager> clazz = (Class<? extends IntegrationManager>) Class
.forName("net.islandearth.rpgregions.api.integrations." + path);
IntegrationManager generatedClazz = null;

View File

@@ -27,6 +27,7 @@ import java.util.Map;
import java.util.Optional;
import java.util.Set;
@Deprecated
public class RPGRegionsIntegration implements IntegrationManager {
private final IRPGRegionsAPI plugin;