Class ForwardMessageOut

java.lang.Object
me.cooleg.bungeemessaging.OutgoingMessages.BungeeMessageOut
me.cooleg.bungeemessaging.OutgoingMessages.ForwardMessageOut
All Implemented Interfaces:
com.google.common.io.ByteArrayDataOutput, DataOutput

public class ForwardMessageOut extends BungeeMessageOut
Specific implementation of 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 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: BungeeMessageOut
      Makes 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:
      sendMessage in class BungeeMessageOut