refactor: migrate package from com.loki to dev.loki
- Change base package from com.loki to dev.loki across all Java files - Update plugin.yml main class path - Fix ConfigParseException imports in test files - Update build.gradle.kts relocate patterns - Add missing imports in ConfigLoaderTest.java - Update TODO.md with current status BREAKING CHANGE: Package namespace changed from com.loki to dev.loki
This commit is contained in:
parent
41924ea97f
commit
f4e9458544
87 changed files with 2185 additions and 1767 deletions
|
|
@ -0,0 +1,74 @@
|
|||
package dev.loki.lomines.integration;
|
||||
|
||||
import dev.loki.lomines.LoMinesPlugin;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
/**
|
||||
* Manages integrations with external plugins.
|
||||
*/
|
||||
public final class IntegrationManager {
|
||||
|
||||
private final LoMinesPlugin plugin;
|
||||
// private PlaceholderAPIIntegration placeholderAPI;
|
||||
|
||||
public IntegrationManager(LoMinesPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all available integrations.
|
||||
*/
|
||||
public void initAll() {
|
||||
// initPlaceholderAPI();
|
||||
checkWorldGuard();
|
||||
checkOraxen();
|
||||
checkItemsAdder();
|
||||
}
|
||||
|
||||
// private void initPlaceholderAPI() {
|
||||
// if (isPluginEnabled("PlaceholderAPI")) {
|
||||
// try {
|
||||
// placeholderAPI = new PlaceholderAPIIntegration(plugin);
|
||||
// placeholderAPI.register();
|
||||
// plugin.loLogger().info("PlaceholderAPI integration enabled");
|
||||
// } catch (Exception e) {
|
||||
// plugin.loLogger().warn("Failed to enable PlaceholderAPI integration: " + e.getMessage());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
private void checkWorldGuard() {
|
||||
if (isPluginEnabled("WorldGuard")) {
|
||||
plugin.loLogger().info("WorldGuard detected (integration not yet implemented)");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkOraxen() {
|
||||
if (isPluginEnabled("Oraxen")) {
|
||||
plugin.loLogger().info("Oraxen integration available");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkItemsAdder() {
|
||||
if (isPluginEnabled("ItemsAdder")) {
|
||||
plugin.loLogger().info("ItemsAdder integration available");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a plugin is enabled.
|
||||
*/
|
||||
public boolean isPluginEnabled(String pluginName) {
|
||||
return Bukkit.getPluginManager().getPlugin(pluginName) != null &&
|
||||
Bukkit.getPluginManager().isPluginEnabled(pluginName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters all integrations.
|
||||
*/
|
||||
public void shutdown() {
|
||||
// if (placeholderAPI != null) {
|
||||
// placeholderAPI.unregister();
|
||||
// }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue