The ChatEvent class contains information about a chat message that has been posted by some player.
Echoing all chat messages.
local queue=Events.collect("ChatEvent")
while true do
local event=queue:next()
spell:execute("say %s", event.message)
end
The ChatEvent class is a subtype of the Event class and inherits all its properties and functions.
Here is an overview of the ChatEvent properties:
Property | Type | read / write |
---|---|---|
message | string | r |
player | Player | r |
Below you find short descriptions about each of the properties and some examples about how to use them in your spells.
The chat message that has been posted.
The player that sent the chat message.