Class MessageContainer

java.lang.Object
dev.zwazel.internal.message.MessageContainer

public final class MessageContainer extends Object
A container for a message. Contains the target, the message, and the tick it was sent and received.

Can be used to send messages to the server, and represent messages received from the server.

  • Constructor Details

  • Method Details

    • applyOnReceive

      public void applyOnReceive(InternalGameWorld internalWorld)
      Apply the message on receive. This will apply the message to the world, and push it to the incoming message queue, if needed.

      Messages that are not pushed to the incoming message queue can not be handled by the bot. This is useful for messages that are only used for internal state changes.

      Parameters:
      internalWorld - the world
    • applyBeforeSend

      public void applyBeforeSend(InternalGameWorld internalWorld)
      Apply the message before sending it. This will apply the message to the world, and push it to the outgoing message queue.
      Parameters:
      internalWorld - the world
    • applyOnAddingToQueue

      public void applyOnAddingToQueue(InternalGameWorld internalWorld)
      Apply the message when added to the queue.
      Parameters:
      internalWorld - the world