diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java index cdbdba1..5164616 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java @@ -20,6 +20,7 @@ import at.pcgamingfreaks.Bukkit.Configuration; import at.pcgamingfreaks.Bukkit.MCVersion; import at.pcgamingfreaks.Bukkit.MinecraftMaterial; +import at.pcgamingfreaks.Bukkit.Util.Utils; import at.pcgamingfreaks.ConsoleColor; import at.pcgamingfreaks.Database.DatabaseConnectionConfiguration; import at.pcgamingfreaks.Minepacks.Bukkit.API.WorldBlacklistMode; @@ -84,7 +85,7 @@ public int getAutoCleanupMaxInactiveDays() public String getDatabaseType() { - return getConfigE().getString("Database.Type", "sqlite"); + return getConfigE().getString("Database.Type", "sqlite").toLowerCase(Locale.ENGLISH); } public void setDatabaseType(String type) @@ -216,7 +217,17 @@ public String getUpdateChannel() public boolean isBungeeCordModeEnabled() { - return getConfigE().getBoolean("Misc.UseBungeeCord", false); + boolean useBungee = getConfigE().getBoolean("Misc.UseBungeeCord", false); + boolean spigotUsesBungee = Utils.detectBungeeCord(); + if(useBungee && !spigotUsesBungee) + { + logger.warning("You have BungeeCord enabled, but it looks like you have not enabled it in your spigot.yml! You probably should check your configuration."); + } + else if(!useBungee && spigotUsesBungee && getDatabaseType().equals("mysql")) + { + logger.warning("Your server is running behind a BungeeCord server. If you are using the plugin please make sure to also enable the 'UseBungeeCord' config option."); + } + return useBungee; } //endregion diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java index e43100e..1f02af6 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java @@ -88,7 +88,7 @@ public void close() { try { - String dbType = plugin.getConfiguration().getDatabaseType().toLowerCase(Locale.ROOT); + String dbType = plugin.getConfiguration().getDatabaseType(); ConnectionProvider connectionProvider = null; if(dbType.equals("shared") || dbType.equals("external") || dbType.equals("global")) { diff --git a/pom.xml b/pom.xml index ba34074..6359cb8 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ pom - 2.3.21.1 + 2.3.21.2 UTF-8 UTF-8