Create stub GeyserService

The FloodgateService and GeyserService classes are not merged,
because Geyser can work without Floodgate.
Added Geyser as 'softdepends' in plugin.yml and bungee.yml
to make it load before FastLogin.
Also made Floodgate a soft dependency in bungee.yml.
This commit is contained in:
Smart123s
2021-11-28 13:44:56 +01:00
committed by games647
parent 5612ca744b
commit 3ee6cb2ada
10 changed files with 136 additions and 0 deletions
@@ -34,6 +34,7 @@ import com.github.games647.fastlogin.core.AsyncScheduler;
import com.github.games647.fastlogin.core.CommonUtil;
import com.github.games647.fastlogin.core.hooks.AuthPlugin;
import com.github.games647.fastlogin.core.hooks.FloodgateService;
import com.github.games647.fastlogin.core.hooks.GeyserService;
import com.github.games647.fastlogin.core.message.ChangePremiumMessage;
import com.github.games647.fastlogin.core.message.ChannelMessage;
import com.github.games647.fastlogin.core.message.NamespaceKey;
@@ -60,6 +61,7 @@ import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.api.plugin.PluginManager;
import net.md_5.bungee.api.scheduler.GroupedThreadFactory;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.floodgate.api.FloodgateApi;
import org.slf4j.Logger;
@@ -73,6 +75,7 @@ public class FastLoginBungee extends Plugin implements PlatformPlugin<CommandSen
private FastLoginCore<ProxiedPlayer, CommandSender, FastLoginBungee> core;
private AsyncScheduler scheduler;
private FloodgateService floodgateService;
private GeyserService geyserService;
private Logger logger;
@Override
@@ -90,6 +93,10 @@ public class FastLoginBungee extends Plugin implements PlatformPlugin<CommandSen
floodgateService = new FloodgateService(FloodgateApi.getInstance(), core);
}
if (isPluginInstalled("Geyser-BungeeCord")) {
geyserService = new GeyserService(GeyserConnector.getInstance(), core);
}
//events
PluginManager pluginManager = getProxy().getPluginManager();
@@ -197,4 +204,9 @@ public class FastLoginBungee extends Plugin implements PlatformPlugin<CommandSen
public FloodgateService getFloodgateService() {
return floodgateService;
}
@Override
public GeyserService getGeyserService() {
return geyserService;
}
}
+3
View File
@@ -13,6 +13,9 @@ softDepends:
- BungeeAuth
- BungeeCordAuthenticatorBungee
- SodionAuth
# Bedrock Player Bridge
- Geyser-BungeeCord
- floodgate
description: |
${project.description}