Search in sources :

Example 1 with LegacyChannelIdentifier

use of com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier in project CloudNet-v3 by CloudNetService.

the class VelocityCloudNetLabyModPlugin method handleProxyInit.

@Subscribe
public void handleProxyInit(ProxyInitializeEvent event) {
    ChannelIdentifier identifier = new LegacyChannelIdentifier(LabyModConstants.LMC_CHANNEL_NAME);
    this.proxyServer.getChannelRegistrar().register(identifier);
    this.labyModManagement = new VelocityLabyModManagement(this.proxyServer, identifier);
    this.proxyServer.getEventManager().register(this, new VelocityLabyModListener(this.labyModManagement));
}
Also used : LegacyChannelIdentifier(com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier) VelocityLabyModListener(eu.cloudnetservice.cloudnet.ext.labymod.velocity.listener.VelocityLabyModListener) LegacyChannelIdentifier(com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier) ChannelIdentifier(com.velocitypowered.api.proxy.messages.ChannelIdentifier) Subscribe(com.velocitypowered.api.event.Subscribe)

Example 2 with LegacyChannelIdentifier

use of com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier in project Advanced-Portals by sekwah41.

the class AdvancedPortalsPlugin method onProxyInitialize.

@Subscribe
public void onProxyInitialize(ProxyInitializeEvent event) {
    String[] splitChannel = BungeeMessages.CHANNEL_NAME.split(":");
    AP_CHANNEL = new LegacyChannelIdentifier(BungeeMessages.CHANNEL_NAME);
    proxy.getChannelRegistrar().register(AP_CHANNEL);
}
Also used : LegacyChannelIdentifier(com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier) Subscribe(com.velocitypowered.api.event.Subscribe)

Aggregations

Subscribe (com.velocitypowered.api.event.Subscribe)2 LegacyChannelIdentifier (com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier)2 ChannelIdentifier (com.velocitypowered.api.proxy.messages.ChannelIdentifier)1 VelocityLabyModListener (eu.cloudnetservice.cloudnet.ext.labymod.velocity.listener.VelocityLabyModListener)1