1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00
azalea/azalea-chat
mat 9a40b65bc1
Add AutoReconnectPlugin (#221)
* add AutoReconnectPlugin

* merge main

* start simplifying swarm internals

* fix Swarm::into_iter, handler functions, DisconnectEvent, and add some more docs

* add ClientBuilder/SwarmBuilder::reconnect_after

* fix a doctest

* reword SwarmEvent::Disconnect doc

* better behavior when we try to join twice

* reconnect on ConnectionFailedEvent too

* autoreconnect is less breaking now
2025-05-02 15:55:58 -05:00
..
src Add AutoReconnectPlugin (#221) 2025-05-02 15:55:58 -05:00
tests remove executable bit from files 2025-04-04 15:56:06 +00:00
Cargo.toml release 0.12.0+mc1.21.5 2025-04-13 05:30:40 +03:00
README.md remove executable bit from files 2025-04-04 15:56:06 +00:00

Azalea Chat

Things for working with Minecraft formatted text components.

Examples

// convert a Minecraft formatted text JSON into colored text that can be printed to the terminal.

use azalea_chat::FormattedText;
use serde_json::Value;
use serde::Deserialize;

let j: Value = serde_json::from_str(
    r#"{"text": "hello","color": "red","bold": true}"#
)
.unwrap();
let text = FormattedText::deserialize(&j).unwrap();
assert_eq!(
    text.to_ansi(),
    "\u{1b}[1m\u{1b}[38;2;255;85;85mhello\u{1b}[m"
);