use of com.velocitypowered.api.event.EventManager in project LibertyBans by A248.
the class VelocityParallelisedListener method unregister.
@Override
public void unregister() {
EventManager eventManager = server.getEventManager();
eventManager.unregister(plugin, handler);
}
use of com.velocitypowered.api.event.EventManager in project LibertyBans by A248.
the class VelocityParallelisedListener method register.
@Override
public final void register() {
Class<E> eventClass = getEventClass();
EventManager eventManager = server.getEventManager();
eventManager.register(plugin, eventClass, PostOrder.EARLY, handler);
}
use of com.velocitypowered.api.event.EventManager in project LimboAPI by Elytrium.
the class EventManagerHook method init.
public static void init(LimboAPI plugin) throws IllegalAccessException, ExecutionException {
instance = new EventManagerHook(plugin.getServer().getPluginManager(), plugin);
EventManager oldEventManager = plugin.getServer().getEventManager();
handlersMapField.set(instance, handlersMapField.get(oldEventManager));
handlersCache.set(instance, handlersCache.get(oldEventManager));
untargetedMethodHandlers.set(instance, untargetedMethodHandlers.get(oldEventManager));
handlerAdapters.set(instance, handlerAdapters.get(oldEventManager));
eventTypeTracker.set(instance, eventTypeTracker.get(oldEventManager));
eventManager.set(plugin.getServer(), instance);
eventManagerInCommandManager.set(plugin.getServer().getCommandManager(), instance);
}
use of com.velocitypowered.api.event.EventManager in project 2FA by LielAmar.
the class TwoFactorAuthentication method registerListeners.
public void registerListeners() {
EventManager eventManager = this.proxy.getEventManager();
eventManager.register(this, new OnPluginMessage(this));
eventManager.register(this, new OnVelocityPlayerConnections(this));
eventManager.register(this, new DisabledEvents(this));
this.proxy.getChannelRegistrar().register(INCOMING = MinecraftChannelIdentifier.create(PluginMessagingHandler.channelName.split(":")[0], PluginMessagingHandler.channelName.split(":")[1]));
this.proxy.getChannelRegistrar().register(OUTGOING = MinecraftChannelIdentifier.create(PluginMessagingHandler.channelName.split(":")[0], PluginMessagingHandler.channelName.split(":")[1]));
}
use of com.velocitypowered.api.event.EventManager in project Parties by AlessioDP.
the class VelocityPartiesPlugin method registerListeners.
@Override
protected void registerListeners() {
getLoggerManager().logDebug(Constants.DEBUG_PLUGIN_REGISTERING, true);
ADPVelocityBootstrap plugin = (ADPVelocityBootstrap) getBootstrap();
EventManager em = plugin.getServer().getEventManager();
em.register(plugin, new VelocityChatListener(this));
em.register(plugin, new VelocityFollowListener(this));
em.register(plugin, new VelocityJoinLeaveListener(this));
}
Aggregations