Hello,
The chat plugin works for me and it is great! 😄
But I am implementing global chat because built one works only per map.
And I have a question about sender
parameter.
I have something like this (found in source):
const data: any = {
message: 'Hello RPGJS community!',
date: Date.now(),
type: 'player',
sender: player.id
}
RpgWorld.getPlayers().forEach(player => {
player.emit('chat-message', data)
});
but the name of the sender is not displayed.
I know I could add:
message: player.name + ': Hello RPGJS community!'
but I am curious if I am doing something wrong or this sender parameter is deprecated.
@Samarium I hope that you are not overwhelmed because of my posts 😅
Edit: I found that you also do not use sender parameter:
sendMessage({
message: `${player.name}: ${message}`,
map,
player
})
so sender
might be deprecated.