Add delay to bungee force-login messages
This commit is contained in:
@@ -308,7 +308,7 @@ public class BukkitService implements SettingsDependent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a ban to the this list. If a previous ban exists, this will
|
||||
* Adds a ban to the list. If a previous ban exists, this will
|
||||
* update the previous entry.
|
||||
*
|
||||
* @param ip the ip of the ban
|
||||
|
||||
@@ -46,7 +46,7 @@ public class BungeeReceiver implements PluginMessageListener, SettingsDependent
|
||||
this.isEnabled = bukkitService.isBungeeCordConfiguredForSpigot().orElse(false);
|
||||
}
|
||||
if (this.isEnabled) {
|
||||
Messenger messenger = plugin.getServer().getMessenger();
|
||||
final Messenger messenger = plugin.getServer().getMessenger();
|
||||
if (!messenger.isIncomingChannelRegistered(plugin, "BungeeCord")) {
|
||||
messenger.registerIncomingPluginChannel(plugin, "BungeeCord", this);
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ public class BungeeSender implements SettingsDependent {
|
||||
if (!isEnabled || destinationServerOnLogin.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// Add a small delay, just in case...
|
||||
bukkitService.scheduleSyncDelayedTask(() ->
|
||||
sendBungeecordMessage(player, "Connect", destinationServerOnLogin), 5L);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user