aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat/src/click_event.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-08-10 18:55:23 -0500
committerGitHub <noreply@github.com>2025-08-10 18:55:23 -0500
commit7120842f9d2c659a2f12d8922299c2a761bc5582 (patch)
tree0d7976ceec82d914e4c75f23adcdd5839f9960a4 /azalea-chat/src/click_event.rs
parent3b659833c1ad4cca89b4cd553193edcb6d223163 (diff)
downloadazalea-drasl-7120842f9d2c659a2f12d8922299c2a761bc5582.tar.xz
Send correct data component checksums (#234)
* start implementing data component crc32 hashes * start doing serde impls for checksums * make more components hashable * make all data components serializable * support recursive components * fix simdnbt dep * update changelog * clippy
Diffstat (limited to 'azalea-chat/src/click_event.rs')
-rw-r--r--azalea-chat/src/click_event.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/azalea-chat/src/click_event.rs b/azalea-chat/src/click_event.rs
new file mode 100644
index 00000000..765ef3ef
--- /dev/null
+++ b/azalea-chat/src/click_event.rs
@@ -0,0 +1,16 @@
+use serde::Serialize;
+use simdnbt::owned::Nbt;
+
+#[derive(Clone, Debug, PartialEq, Serialize)]
+#[serde(rename_all = "snake_case", tag = "action")]
+pub enum ClickEvent {
+ OpenUrl { url: String },
+ OpenFile { path: String },
+ RunCommand { command: String },
+ SuggestCommand { command: String },
+ // TODO: this uses Dialog.CODEC
+ ShowDialog,
+ ChangePage { page: i32 },
+ CopyToClipboard { value: String },
+ Custom { id: String, payload: Nbt },
+}