aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-10-12 20:14:29 -0500
committermat <git@matdoes.dev>2023-10-12 20:14:29 -0500
commit38db231ea8fa0fb223e16637db0b6ec65b2b81ef (patch)
treef8f61b04ad0b498b85bffb133c51af1670a33ddf /azalea-protocol/src/packets
parentd5f424b8c2fba9b3283aef36fe9e1e051636614c (diff)
downloadazalea-drasl-38db231ea8fa0fb223e16637db0b6ec65b2b81ef.tar.xz
brigadier usages
Diffstat (limited to 'azalea-protocol/src/packets')
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs b/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs
index 88c6f29e..d1ad1240 100755
--- a/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs
@@ -19,14 +19,14 @@ mod tests {
#[test]
fn test_suggestions() {
- let suggestions = Suggestions {
- range: StringRange::new(0, 5),
- suggestions: vec![Suggestion {
- text: "foo".to_string(),
- range: StringRange::new(1, 4),
- tooltip: Some(FormattedText::from("bar".to_string())),
- }],
- };
+ let suggestions = Suggestions::new(
+ StringRange::new(0, 5),
+ vec![Suggestion::new_with_tooltip(
+ StringRange::new(1, 4),
+ "foo",
+ FormattedText::from("bar".to_string()),
+ )],
+ );
let mut buf = Vec::new();
suggestions.write_into(&mut buf).unwrap();
let mut cursor = Cursor::new(&buf[..]);