mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-01-07 19:28:11 +01:00
Add warning when bungeecord settings mismatch between server and plugin
This commit is contained in:
parent
865148fee3
commit
4df0ea78e9
@ -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
|
||||
|
||||
|
@ -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"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user