com.velocitypowered.api.event.proxy.ProxyShutdownEvent Java Examples

The following examples show how to use com.velocitypowered.api.event.proxy.ProxyShutdownEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VelocityBootstrap.java    From AntiVPN with MIT License 5 votes vote down vote up
@Subscribe(order = PostOrder.LATE)
public void onDisable(ProxyShutdownEvent event) {
    try {
        concreteClass.getMethod("onDisable").invoke(concrete);
    } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
        logger.error(ex.getMessage(), ex);
        throw new RuntimeException("Could not invoke onDisable.");
    }
}
 
Example #2
Source File: GeyserVelocityPlugin.java    From Geyser with MIT License 4 votes vote down vote up
@Subscribe
public void onShutdown(ProxyShutdownEvent event) {
    onDisable();
}
 
Example #3
Source File: VelocitySparkPlugin.java    From spark with GNU General Public License v3.0 4 votes vote down vote up
@Subscribe(order = PostOrder.LAST)
public void onDisable(ProxyShutdownEvent e) {
    this.platform.disable();
}
 
Example #4
Source File: VelocityEventManager.java    From Velocity with MIT License 4 votes vote down vote up
public void fireShutdownEvent() {
  // We shut down the proxy already, so the fact this executes in the main thread is irrelevant.
  fireEvent(new ProxyShutdownEvent());
}
 
Example #5
Source File: SkinsRestorer.java    From SkinsRestorerX with GNU General Public License v3.0 4 votes vote down vote up
@Subscribe
public void onShutDown(ProxyShutdownEvent ev) {
    this.logger.logAlways("Disabling SkinsRestorer v" + getVersion());
    this.logger.logAlways("Disabled SkinsRestorer v" + getVersion());
}
 
Example #6
Source File: PlanVelocity.java    From Plan with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Subscribe
public void onProxyShutdown(ProxyShutdownEvent event) {
    onDisable();
}
 
Example #7
Source File: LPVelocityBootstrap.java    From LuckPerms with MIT License 4 votes vote down vote up
@Subscribe(order = PostOrder.LAST)
public void onDisable(ProxyShutdownEvent e) {
    this.plugin.disable();
}
 
Example #8
Source File: VotifierPlugin.java    From NuVotifier with GNU General Public License v3.0 4 votes vote down vote up
@Subscribe
public void onServerStop(ProxyShutdownEvent event) {
    this.halt();
    logger.info("Votifier disabled.");
}
 
Example #9
Source File: VelocityPlugin.java    From ServerListPlus with GNU General Public License v3.0 4 votes vote down vote up
@Subscribe
public void shutdown(ProxyShutdownEvent event) {
    try {
        core.stop();
    } catch (ServerListPlusException ignored) {}
}