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:
1 parent
5612ca744b
commit
3ee6cb2ada
10 files changed
+136
No files matched your search
@@ -209,6 +209,14 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Bedrock player bridge, used for low level checks -->
|
||||
<dependency>
|
||||
<groupId>org.geysermc</groupId>
|
||||
<artifactId>connector</artifactId>
|
||||
<version>1.4.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!--Login Plugins-->
|
||||
<dependency>
|
||||
<groupId>fr.xephi</groupId>
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.github.games647.fastlogin.bukkit.task.DelayedAuthHook;
|
||||
import com.github.games647.fastlogin.core.CommonUtil;
|
||||
import com.github.games647.fastlogin.core.PremiumStatus;
|
||||
import com.github.games647.fastlogin.core.hooks.FloodgateService;
|
||||
import com.github.games647.fastlogin.core.hooks.GeyserService;
|
||||
import com.github.games647.fastlogin.core.shared.FastLoginCore;
|
||||
import com.github.games647.fastlogin.core.shared.PlatformPlugin;
|
||||
|
||||
@@ -53,6 +54,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.connector.GeyserConnector;
|
||||
import org.geysermc.floodgate.api.FloodgateApi;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -71,6 +73,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
private final BukkitScheduler scheduler;
|
||||
private FastLoginCore<Player, CommandSender, FastLoginBukkit> core;
|
||||
private FloodgateService floodgateService;
|
||||
private GeyserService geyserService;
|
||||
|
||||
private PremiumPlaceholder premiumPlaceholder;
|
||||
|
||||
@@ -146,6 +149,10 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
}
|
||||
|
||||
private boolean initializeFloodgate() {
|
||||
if (getServer().getPluginManager().getPlugin("Geyser-Spigot") != null) {
|
||||
geyserService = new GeyserService(GeyserConnector.getInstance(), core);
|
||||
}
|
||||
|
||||
if (getServer().getPluginManager().getPlugin("floodgate") != null) {
|
||||
floodgateService = new FloodgateService(FloodgateApi.getInstance(), core);
|
||||
|
||||
@@ -281,6 +288,11 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
return floodgateService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GeyserService getGeyserService() {
|
||||
return geyserService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send warning messages to log if incompatible plugins are used
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,8 @@ softdepend:
|
||||
- ProtocolLib
|
||||
# Premium variable
|
||||
- PlaceholderAPI
|
||||
# Bedrock Player Bridge
|
||||
- Geyser-Spigot
|
||||
- floodgate
|
||||
# Auth plugins
|
||||
- AuthMe
|
||||
|
||||
Reference in new issue
Block a user