mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-11-14 10:45:23 +01:00
Add velocity and paper proxy online mode detection
This commit is contained in:
parent
fcfd96d242
commit
ae52896d78
@ -128,6 +128,12 @@ public boolean useOnlineUUIDs()
|
|||||||
{
|
{
|
||||||
if(isBungeeCordModeEnabled())
|
if(isBungeeCordModeEnabled())
|
||||||
{
|
{
|
||||||
|
Boolean detectedOnlineMode = Utils.getBungeeOrVelocityOnlineMode();
|
||||||
|
if (detectedOnlineMode != null)
|
||||||
|
{
|
||||||
|
logger.info("Detected online mode in paper config: " + detectedOnlineMode);
|
||||||
|
return detectedOnlineMode;
|
||||||
|
}
|
||||||
logger.warning("When using BungeeCord please make sure to set the UUID_Type config option explicitly!");
|
logger.warning("When using BungeeCord please make sure to set the UUID_Type config option explicitly!");
|
||||||
}
|
}
|
||||||
return Bukkit.getServer().getOnlineMode();
|
return Bukkit.getServer().getOnlineMode();
|
||||||
@ -222,13 +228,13 @@ public String getUpdateChannel()
|
|||||||
public boolean isBungeeCordModeEnabled()
|
public boolean isBungeeCordModeEnabled()
|
||||||
{
|
{
|
||||||
boolean useBungee = getConfigE().getBoolean("Misc.UseBungeeCord", false);
|
boolean useBungee = getConfigE().getBoolean("Misc.UseBungeeCord", false);
|
||||||
boolean spigotUsesBungee = Utils.detectBungeeCord();
|
boolean runsProxy = Utils.detectBungeeCord() || Utils.detectVelocity();
|
||||||
boolean shareableDB = getDatabaseType().equals("mysql") || getDatabaseType().equals("global");
|
boolean shareableDB = getDatabaseType().equals("mysql") || getDatabaseType().equals("global");
|
||||||
if(useBungee && !spigotUsesBungee)
|
if(useBungee && !runsProxy)
|
||||||
{
|
{
|
||||||
logger.warning("You have BungeeCord enabled for the plugin, but it looks like you have not enabled it in your spigot.yml! You probably should check your configuration.");
|
logger.warning("You have BungeeCord enabled for the plugin, but it looks like you have not enabled it in your spigot.yml! You probably should check your configuration.");
|
||||||
}
|
}
|
||||||
else if(!useBungee && spigotUsesBungee && shareableDB)
|
else if(!useBungee && runsProxy && shareableDB)
|
||||||
{
|
{
|
||||||
logger.warning("Your server is running behind a BungeeCord server. If you are using the plugin on more than one server with a shared database, please make sure to also enable the 'UseBungeeCord' config option.");
|
logger.warning("Your server is running behind a BungeeCord server. If you are using the plugin on more than one server with a shared database, please make sure to also enable the 'UseBungeeCord' config option.");
|
||||||
}
|
}
|
||||||
|
2
pom.xml
2
pom.xml
@ -7,7 +7,7 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2.4.18</revision>
|
<revision>2.4.19</revision>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user