Actually handle proxy shutdown this time

This commit is contained in:
juanmuscaria
2021-09-17 09:45:09 -03:00
parent 20379d13b2
commit 64fbbf759f

View File

@ -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<CommandSource> {
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;