diff --git a/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java index 05d5bc0e..15e7beea 100644 --- a/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java +++ b/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java @@ -40,6 +40,7 @@ import com.google.inject.Inject; import com.velocitypowered.api.command.CommandSource; import com.velocitypowered.api.event.Subscribe; import com.velocitypowered.api.event.proxy.ProxyInitializeEvent; +import com.velocitypowered.api.event.proxy.ProxyShutdownEvent; import com.velocitypowered.api.plugin.Plugin; import com.velocitypowered.api.plugin.annotation.DataDirectory; import com.velocitypowered.api.proxy.Player; @@ -99,6 +100,13 @@ public class FastLoginVelocity implements PlatformPlugin { server.getEventManager().register(this, new PluginMessageListener(this)); } + @Subscribe + public void onProxyShutdown(ProxyShutdownEvent event) { + if (core != null) { + core.close(); + } + } + @Override public String getName() { return PomData.NAME;