mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-11 19:53:52 +00:00
Add Chat Formatting Support For Servers (#1483)
* add chat support for html formatting * html character serialization, normal color format support * change for chat input handling on color has a bug where the text after the cursor gets stripped of its color, need to make a function to backstep on a string and find the last used color codes, or get all color codes used before the string is split, and apply them to the start of the next string * expose jukebox label as action bar like java * prevent players from sending chat color * restore non styled chat size check
This commit is contained in:
parent
bfcb621808
commit
14f8d793dd
11 changed files with 128 additions and 12 deletions
|
|
@ -679,7 +679,7 @@ void PlayerConnection::handleChat(shared_ptr<ChatPacket> packet)
|
|||
return;
|
||||
}
|
||||
wstring formatted = L"<" + player->name + L"> " + message;
|
||||
server->getPlayers()->broadcastAll(shared_ptr<ChatPacket>(new ChatPacket(formatted)));
|
||||
server->getPlayers()->broadcastAll(shared_ptr<ChatPacket>(new ChatPacket(app.FormatChatMessage(formatted, false))));
|
||||
chatSpamTickCount += SharedConstants::TICKS_PER_SECOND;
|
||||
if (chatSpamTickCount > SharedConstants::TICKS_PER_SECOND * 10)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue