Search in sources :

Example 6 with NamespaceKey

use of com.github.games647.changeskin.core.message.NamespaceKey in project ChangeSkin by games647.

the class ChangeSkinBukkit method sendPluginMessage.

public void sendPluginMessage(PluginMessageRecipient sender, ChannelMessage message) {
    ByteArrayDataOutput out = ByteStreams.newDataOutput();
    message.writeTo(out);
    NamespaceKey channel = new NamespaceKey(getName(), message.getChannelName());
    sender.sendPluginMessage(this, channel.getCombinedName(), out.toByteArray());
}
Also used : NamespaceKey(com.github.games647.changeskin.core.message.NamespaceKey) ByteArrayDataOutput(com.google.common.io.ByteArrayDataOutput)

Example 7 with NamespaceKey

use of com.github.games647.changeskin.core.message.NamespaceKey in project ChangeSkin by games647.

the class ChangeSkinBungee method sendPluginMessage.

public void sendPluginMessage(Server server, ChannelMessage message) {
    if (server != null) {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        message.writeTo(out);
        NamespaceKey channel = new NamespaceKey(getName(), message.getChannelName());
        server.sendData(channel.getCombinedName(), out.toByteArray());
    }
}
Also used : NamespaceKey(com.github.games647.changeskin.core.message.NamespaceKey) ByteArrayDataOutput(com.google.common.io.ByteArrayDataOutput)

Example 8 with NamespaceKey

use of com.github.games647.changeskin.core.message.NamespaceKey in project FastLogin by games647.

the class FastLoginBungee method sendPluginMessage.

public void sendPluginMessage(Server server, ChannelMessage message) {
    if (server != null) {
        ByteArrayDataOutput dataOutput = ByteStreams.newDataOutput();
        message.writeTo(dataOutput);
        NamespaceKey channel = new NamespaceKey(getName(), message.getChannelName());
        server.sendData(channel.getCombinedName(), dataOutput.toByteArray());
    }
}
Also used : NamespaceKey(com.github.games647.fastlogin.core.message.NamespaceKey) ByteArrayDataOutput(com.google.common.io.ByteArrayDataOutput)

Aggregations

NamespaceKey (com.github.games647.changeskin.core.message.NamespaceKey)5 ByteArrayDataOutput (com.google.common.io.ByteArrayDataOutput)4 NamespaceKey (com.github.games647.fastlogin.core.message.NamespaceKey)3 CheckPermissionListener (com.github.games647.changeskin.bukkit.bungee.CheckPermissionListener)1 SkinUpdateListener (com.github.games647.changeskin.bukkit.bungee.SkinUpdateListener)1 InfoCommand (com.github.games647.changeskin.bungee.command.InfoCommand)1 InvalidateCommand (com.github.games647.changeskin.bungee.command.InvalidateCommand)1 SelectCommand (com.github.games647.changeskin.bungee.command.SelectCommand)1 SetCommand (com.github.games647.changeskin.bungee.command.SetCommand)1 UploadCommand (com.github.games647.changeskin.bungee.command.UploadCommand)1 ConnectListener (com.github.games647.changeskin.bungee.listener.ConnectListener)1 PluginMessageListener (com.github.games647.changeskin.bungee.listener.PluginMessageListener)1 ServerSwitchListener (com.github.games647.changeskin.bungee.listener.ServerSwitchListener)1 ChangeSkinCore (com.github.games647.changeskin.core.ChangeSkinCore)1 CheckPermissionListener (com.github.games647.changeskin.sponge.bungee.CheckPermissionListener)1 UpdateSkinListener (com.github.games647.changeskin.sponge.bungee.UpdateSkinListener)1 BungeeListener (com.github.games647.fastlogin.bukkit.listener.BungeeListener)1 PluginManager (net.md_5.bungee.api.plugin.PluginManager)1 Server (org.bukkit.Server)1 Messenger (org.bukkit.plugin.messaging.Messenger)1