chunkedge_protocol/packets/play/
set_score_s2c.rs

1use std::borrow::Cow;
2
3use chunkedge_binary::{Decode, Encode, TextComponent, VarInt};
4
5use super::set_objective_s2c::NumberFormat;
6use crate::Packet;
7
8#[derive(Clone, Debug, Encode, Decode, Packet)]
9pub struct SetScoreS2c<'a> {
10    //The entity whose score this is. For players, this is their username; for other entities, it
11    // is their UUID.
12    pub entity_name: &'a str,
13    pub objective_name: &'a str,
14    pub value: VarInt,
15    pub display_name: Option<Cow<'a, TextComponent>>,
16    pub number_format: Option<NumberFormat<'a>>,
17}