API reference / @jsprismarine/prismarine / Chat
Class: Chat
Defined in: prismarine/src/chat/Chat.ts:36
One message on its way to the players and the console.
The type defaults to RAW, a line sent as written. Pass CHAT for a message a player typed: the sender is then its author on the client, so the message itself carries no name.
Constructors
Constructor
new Chat(
__namedParameters):Chat
Defined in: prismarine/src/chat/Chat.ts:44
Parameters
__namedParameters
channel?
string
message
string
needsTranslation?
boolean
parameters?
string[]
sender
type?
ChatType
Returns
Chat
Methods
getChannel()
getChannel():
string
Defined in: prismarine/src/chat/Chat.ts:68
Returns
string
getMessage()
getMessage():
string
Defined in: prismarine/src/chat/Chat.ts:76
Returns
string
getParameters()
getParameters():
string[]
Defined in: prismarine/src/chat/Chat.ts:80
Returns
string[]
getSender()
getSender():
CommandExecutor
Defined in: prismarine/src/chat/Chat.ts:72
Returns
getType()
getType():
ChatType
Defined in: prismarine/src/chat/Chat.ts:88
Returns
ChatType
isNeedsTranslation()
isNeedsTranslation():
boolean
Defined in: prismarine/src/chat/Chat.ts:84
Returns
boolean