@Override public void sendPluginMessage(Plugin source, String channel, byte[] message) { StandardMessenger.validatePluginMessage(getMessenger(), source, channel, message); for (Player player : getOnlinePlayers()) { player.sendPluginMessage(source, channel, message); } }
public void sendPluginMessage(Plugin source, String channel, byte[] message) { StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message); if (getHandle().playerNetServerHandler == null) return; if (channels.contains(channel)) { Packet250CustomPayload packet = new Packet250CustomPayload(); packet.channel = channel; packet.length = message.length; packet.data = message; getHandle().playerNetServerHandler.sendPacketToPlayer(packet); } }
public void sendPluginMessage(Plugin source, String channel, byte[] message) { StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message); if (getHandle().field_71135_a == null) return; if (channels.contains(channel)) { net.minecraft.network.packet.Packet250CustomPayload packet = new net.minecraft.network.packet.Packet250CustomPayload(); packet.field_73630_a = channel; packet.field_73628_b = message.length; packet.field_73629_c = message; getHandle().field_71135_a.func_72567_b(packet); } }