Search in sources :

Example 1 with ChannelIdentifier

use of com.velocitypowered.api.proxy.messages.ChannelIdentifier in project ADP-Core by AlessioDP.

the class VelocityBungeecordListener method registerChannel.

@Override
public void registerChannel(@NotNull MessageChannel channel) {
    ChannelIdentifier identifier = MinecraftChannelIdentifier.create(plugin.getPluginFallbackName(), channel.getId());
    ((ADPVelocityBootstrap) plugin.getBootstrap()).getServer().getChannelRegistrar().register(identifier);
    getChannels().put(channel, identifier);
}
Also used : ADPVelocityBootstrap(com.alessiodp.core.velocity.bootstrap.ADPVelocityBootstrap) MinecraftChannelIdentifier(com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier) ChannelIdentifier(com.velocitypowered.api.proxy.messages.ChannelIdentifier)

Example 2 with ChannelIdentifier

use of com.velocitypowered.api.proxy.messages.ChannelIdentifier 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 3 with ChannelIdentifier

use of com.velocitypowered.api.proxy.messages.ChannelIdentifier in project Floodgate by GeyserMC.

the class VelocityPluginMessageRegistration method register.

@Override
public void register(PluginMessageChannel channel) {
    ChannelIdentifier identifier = MinecraftChannelIdentifier.from(channel.getIdentifier());
    proxy.getChannelRegistrar().register(identifier);
}
Also used : MinecraftChannelIdentifier(com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier) ChannelIdentifier(com.velocitypowered.api.proxy.messages.ChannelIdentifier)

Example 4 with ChannelIdentifier

use of com.velocitypowered.api.proxy.messages.ChannelIdentifier in project ADP-Core by AlessioDP.

the class VelocityBungeecordDispatcher method registerChannel.

@Override
public void registerChannel(@NotNull MessageChannel channel) {
    ChannelIdentifier identifier = MinecraftChannelIdentifier.create(plugin.getPluginFallbackName(), channel.getId());
    ((ADPVelocityBootstrap) plugin.getBootstrap()).getServer().getChannelRegistrar().register(identifier);
    getChannels().put(channel, identifier);
}
Also used : ADPVelocityBootstrap(com.alessiodp.core.velocity.bootstrap.ADPVelocityBootstrap) MinecraftChannelIdentifier(com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier) ChannelIdentifier(com.velocitypowered.api.proxy.messages.ChannelIdentifier)

Aggregations

ChannelIdentifier (com.velocitypowered.api.proxy.messages.ChannelIdentifier)4 MinecraftChannelIdentifier (com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier)3 ADPVelocityBootstrap (com.alessiodp.core.velocity.bootstrap.ADPVelocityBootstrap)2 Subscribe (com.velocitypowered.api.event.Subscribe)1 LegacyChannelIdentifier (com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier)1 VelocityLabyModListener (eu.cloudnetservice.cloudnet.ext.labymod.velocity.listener.VelocityLabyModListener)1