Add floodgate service to Bungee

This commit is contained in:
games647 committed 2021-10-05 15:42:40 +02:00
1 parent a3bf875976
commit 28480a0f01
9 files changed
+30 -11

No files matched your search

@@ -53,6 +53,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.geysermc.floodgate.api.FloodgateApi;
import org.slf4j.Logger;
/**
@@ -146,7 +147,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
private boolean initializeFloodgate() {
if (getServer().getPluginManager().getPlugin("Floodgate") != null) {
floodgateService = new FloodgateService(core);
floodgateService = new FloodgateService(FloodgateApi.getInstance(), core);
}
// Check Floodgate config values
@@ -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.getCore().getFloodgateService());
super(plugin.getCore(), plugin.getCore().getAuthPluginHook(), plugin.getFloodgateService());
this.plugin = plugin;
this.packetEvent = packetEvent;
@@ -53,7 +53,7 @@ public class ProtocolSupportListener extends JoinManagement<Player, CommandSende
private final RateLimiter rateLimiter;
public ProtocolSupportListener(FastLoginBukkit plugin, RateLimiter rateLimiter) {
super(plugin.getCore(), plugin.getCore().getAuthPluginHook());
super(plugin.getCore(), plugin.getCore().getAuthPluginHook(), plugin.getFloodgateService());
this.plugin = plugin;
this.rateLimiter = rateLimiter;