Class ForwardMessageOut
java.lang.Object
me.cooleg.bungeemessaging.OutgoingMessages.BungeeMessageOut
me.cooleg.bungeemessaging.OutgoingMessages.ForwardMessageOut
- All Implemented Interfaces:
com.google.common.io.ByteArrayDataOutput,DataOutput
Specific implementation of
Typically would be a slight pain, writing the sub channel, target, byte array length, etc.
Using this, any data you write is the data that goes into the message, so you don't have to deal with that stuff.
BungeeMessageOut to simplify the writing of "forward" bungee messages. Typically would be a slight pain, writing the sub channel, target, byte array length, etc.
Using this, any data you write is the data that goes into the message, so you don't have to deal with that stuff.
-
Constructor Summary
ConstructorsConstructorDescriptionForwardMessageOut(org.bukkit.entity.Player player, ForwardMessageType type, String target, String subChannel) Initialize a ForwardMessage instead of a regular old BungeeMessage. -
Method Summary
Modifier and TypeMethodDescriptionvoidMakes a new data output, and writes the MessageType string and your written data to it.Methods inherited from class me.cooleg.bungeemessaging.OutgoingMessages.BungeeMessageOut
setPlugin, toByteArray, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Constructor Details
-
ForwardMessageOut
public ForwardMessageOut(@Nonnull org.bukkit.entity.Player player, @Nonnull ForwardMessageType type, @Nonnull String target, @Nonnull String subChannel) Initialize a ForwardMessage instead of a regular old BungeeMessage.- Parameters:
player- For sending any plugin messages, you need a player to send it through. This doesn't matter in most cases.type- Is this message going to a server, or to a player?target- If this is to a server, you can specify a server name, "ONLINE" for online servers, or "ALL" for all servers. If this is to a player, put their name.subChannel- Use the same subchannel name for sending and receiving the same messages to differentiate between messages.- See Also:
-
-
Method Details
-
sendMessage
public void sendMessage()Description copied from class:BungeeMessageOutMakes a new data output, and writes the MessageType string and your written data to it. If you haven't written any data to this class, it won't write any additional data.- Overrides:
sendMessagein classBungeeMessageOut
-