org.bukkit.plugin.messaging.PluginMessageRecipient Java Examples
The following examples show how to use
org.bukkit.plugin.messaging.PluginMessageRecipient.
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: BungeeManager.java From FastLogin with MIT License | 5 votes |
public void sendPluginMessage(PluginMessageRecipient player, ChannelMessage message) { if (player != null) { ByteArrayDataOutput dataOutput = ByteStreams.newDataOutput(); message.writeTo(dataOutput); NamespaceKey channel = new NamespaceKey(plugin.getName(), message.getChannelName()); player.sendPluginMessage(plugin, channel.getCombinedName(), dataOutput.toByteArray()); } }
Example #2
Source File: ChangeSkinBukkit.java From ChangeSkin with MIT License | 5 votes |
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()); }