1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-19 14:59:20 +00:00

Do not swallow errors on Spigot

This commit is contained in:
Camotoy
2024-06-13 18:01:39 -04:00
parent c4a44879b8
commit e1bae5765b

View File

@@ -67,17 +67,12 @@ public final class SpigotPlugin extends JavaPlugin {
boolean usePaperListener = ReflectionUtils.getClassSilently(
"com.destroystokyo.paper.event.profile.PreFillProfileEvent") != null;
try {
platform.enable(
new SpigotCommandModule(this),
new SpigotAddonModule(),
new PluginMessageModule(),
(usePaperListener ? new PaperListenerModule() : new SpigotListenerModule())
);
} catch (Exception exception) {
Bukkit.getPluginManager().disablePlugin(this);
throw exception;
}
injector.getInstance(HandshakeHandlers.class)
.addHandshakeHandler(injector.getInstance(SpigotHandshakeHandler.class));