mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-28 03:09:14 +00:00
Implements #12
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="RPGRegions" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="net.islandearth" external.system.module.version="1.0.5" type="JAVA_MODULE" version="4">
|
||||
<component name="ExternalSystem" externalSystem="GRADLE" externalSystemModuleGroup="net.islandearth" externalSystemModuleVersion="1.2.1" linkedProjectId="RPGRegions" linkedProjectPath="$MODULE_DIR$" rootProjectPath="$MODULE_DIR$" />
|
||||
<component name="ExternalSystem" externalSystem="GRADLE" externalSystemModuleGroup="net.islandearth" externalSystemModuleVersion="1.2.2" linkedProjectId="RPGRegions" linkedProjectPath="$MODULE_DIR$" rootProjectPath="$MODULE_DIR$" />
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
@@ -100,8 +101,7 @@ public final class RPGRegions extends JavaPlugin implements RPGRegionsAPI, Langu
|
||||
header += "Found a bug? Create an issue at https://gitlab.com/SamB440/rpgregions-2/issues" + eol;
|
||||
header += "Need help? Join our discord at https://discord.gg/fh62mxU" + eol;
|
||||
config.options().header(header);
|
||||
if (!isLegacyServer()) config.addDefault("settings.integration.name", "WorldGuard");
|
||||
else config.addDefault("settings.integration.name", "WorldGuard_Legacy");
|
||||
config.addDefault("settings.integration.name", getIntegration());
|
||||
config.addDefault("settings.storage.mode", "file");
|
||||
config.addDefault("settings.sql.host", "localhost");
|
||||
config.addDefault("settings.sql.port", 3306);
|
||||
@@ -207,4 +207,14 @@ public final class RPGRegions extends JavaPlugin implements RPGRegionsAPI, Langu
|
||||
public boolean hasHeadDatabase() {
|
||||
return Bukkit.getPluginManager().getPlugin("HeadDatabase") != null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String getIntegration() {
|
||||
if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) {
|
||||
return isLegacyServer() ? "WorldGuard_Legacy" : "WorldGuard";
|
||||
} else if (Bukkit.getPluginManager().getPlugin("Residence") != null) {
|
||||
return "Residence";
|
||||
}
|
||||
return "WorldGuard";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user