diff options
| author | mat <git@matdoes.dev> | 2023-10-12 20:14:29 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-12 20:14:29 -0500 |
| commit | 38db231ea8fa0fb223e16637db0b6ec65b2b81ef (patch) | |
| tree | f8f61b04ad0b498b85bffb133c51af1670a33ddf /azalea-chat | |
| parent | d5f424b8c2fba9b3283aef36fe9e1e051636614c (diff) | |
| download | azalea-drasl-38db231ea8fa0fb223e16637db0b6ec65b2b81ef.tar.xz | |
brigadier usages
Diffstat (limited to 'azalea-chat')
| -rwxr-xr-x | azalea-chat/src/base_component.rs | 2 | ||||
| -rwxr-xr-x | azalea-chat/src/component.rs | 2 | ||||
| -rwxr-xr-x | azalea-chat/src/style.rs | 4 | ||||
| -rwxr-xr-x | azalea-chat/src/text_component.rs | 2 | ||||
| -rwxr-xr-x | azalea-chat/src/translatable_component.rs | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/azalea-chat/src/base_component.rs b/azalea-chat/src/base_component.rs index 43b35aef..dcc28ecc 100755 --- a/azalea-chat/src/base_component.rs +++ b/azalea-chat/src/base_component.rs @@ -1,7 +1,7 @@ use crate::{style::Style, FormattedText}; use serde::Serialize; -#[derive(Clone, Debug, PartialEq, Serialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Eq, Hash)] pub struct BaseComponent { // implements mutablecomponent #[serde(skip_serializing_if = "Vec::is_empty")] diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index e087713c..fb7e0522 100755 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -15,7 +15,7 @@ use std::{ }; /// A chat component, basically anything you can see in chat. -#[derive(Clone, Debug, PartialEq, Serialize)] +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Hash)] #[serde(untagged)] pub enum FormattedText { Text(TextComponent), diff --git a/azalea-chat/src/style.rs b/azalea-chat/src/style.rs index 9c0d645e..ba4d6e72 100755 --- a/azalea-chat/src/style.rs +++ b/azalea-chat/src/style.rs @@ -6,7 +6,7 @@ use once_cell::sync::Lazy; use serde::{ser::SerializeStruct, Serialize, Serializer}; use serde_json::Value; -#[derive(Clone, PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug, Hash)] pub struct TextColor { pub value: u32, pub name: Option<String>, @@ -290,7 +290,7 @@ impl TryFrom<ChatFormatting> for TextColor { } } -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] pub struct Style { // These are options instead of just bools because None is different than false in this case pub color: Option<TextColor>, diff --git a/azalea-chat/src/text_component.rs b/azalea-chat/src/text_component.rs index 42932d0e..fefd2cb8 100755 --- a/azalea-chat/src/text_component.rs +++ b/azalea-chat/src/text_component.rs @@ -3,7 +3,7 @@ use serde::{ser::SerializeMap, Serialize, Serializer, __private::ser::FlatMapSer use std::fmt::Display; /// A component that contains text that's the same in all locales. -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] pub struct TextComponent { pub base: BaseComponent, pub text: String, diff --git a/azalea-chat/src/translatable_component.rs b/azalea-chat/src/translatable_component.rs index a1c72e35..56c6507e 100755 --- a/azalea-chat/src/translatable_component.rs +++ b/azalea-chat/src/translatable_component.rs @@ -5,7 +5,7 @@ use crate::{ }; use serde::{ser::SerializeMap, Serialize, Serializer, __private::ser::FlatMapSerializer}; -#[derive(Clone, Debug, PartialEq, Serialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Eq, Hash)] #[serde(untagged)] pub enum StringOrComponent { String(String), @@ -13,7 +13,7 @@ pub enum StringOrComponent { } /// A message whose content depends on the client's language. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] pub struct TranslatableComponent { pub base: BaseComponent, pub key: String, |
