Class MessageContainer
java.lang.Object
dev.zwazel.internal.message.MessageContainer
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyBeforeSend
(InternalGameWorld internalWorld) Apply the message before sending it.void
applyOnAddingToQueue
(InternalGameWorld internalWorld) Apply the message when added to the queue.void
applyOnReceive
(InternalGameWorld internalWorld) Apply the message on receive.
-
Constructor Details
-
MessageContainer
-
-
Method Details
-
applyOnReceive
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
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
Apply the message when added to the queue.- Parameters:
internalWorld
- the world
-