Detect Geyser connections at packet level

It is possible to use Geyser without Floodgate by configuring Geyser to
use auth-type= 'online' or 'offline'. In that scenario, floodgateService
will be either unavailable or empty.
This commit is contained in:
Smart123s
2021-11-28 13:44:57 +01:00
committed by games647
parent 3ee6cb2ada
commit f570474fa3
5 changed files with 15 additions and 5 deletions
@@ -54,7 +54,7 @@ public class NameCheckTask extends JoinManagement<Player, CommandSender, Protoco
public NameCheckTask(FastLoginBukkit plugin, Random random, Player player, PacketEvent packetEvent,
String username, PublicKey publicKey) {
super(plugin.getCore(), plugin.getCore().getAuthPluginHook(), plugin.getFloodgateService());
super(plugin.getCore(), plugin.getCore().getAuthPluginHook(), plugin.getFloodgateService(), plugin.getGeyserService());
this.plugin = plugin;
this.packetEvent = packetEvent;
@@ -53,7 +53,8 @@ public class ProtocolSupportListener extends JoinManagement<Player, CommandSende
private final RateLimiter rateLimiter;
public ProtocolSupportListener(FastLoginBukkit plugin, RateLimiter rateLimiter) {
super(plugin.getCore(), plugin.getCore().getAuthPluginHook(), plugin.getFloodgateService());
super(plugin.getCore(), plugin.getCore().getAuthPluginHook(), plugin.getFloodgateService(),
plugin.getGeyserService());
this.plugin = plugin;
this.rateLimiter = rateLimiter;