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