mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
fix: make fields in PlayerInfo::Action public (#32)
This PR makes the fields in the PlayerInfo packet public. I encountered this issue when writing my own bot which needs a list of UUID > String of all currently logged-in players, and while writing my handler for `Action::RemovePlayer` I found out that the `uuid` field is private. This PR fixes that.
This commit is contained in:
parent
c0338cac35
commit
41606fdd14
1 changed files with 10 additions and 10 deletions
|
@ -22,9 +22,9 @@ pub enum Action {
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
#[derive(Clone, Debug, McBuf)]
|
||||||
pub struct PlayerProperty {
|
pub struct PlayerProperty {
|
||||||
name: String,
|
pub name: String,
|
||||||
value: String,
|
pub value: String,
|
||||||
signature: Option<String>,
|
pub signature: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
@ -42,26 +42,26 @@ pub struct AddPlayer {
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
#[derive(Clone, Debug, McBuf)]
|
||||||
pub struct UpdateGameMode {
|
pub struct UpdateGameMode {
|
||||||
uuid: Uuid,
|
pub uuid: Uuid,
|
||||||
#[var]
|
#[var]
|
||||||
gamemode: u32,
|
pub gamemode: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
#[derive(Clone, Debug, McBuf)]
|
||||||
pub struct UpdateLatency {
|
pub struct UpdateLatency {
|
||||||
uuid: Uuid,
|
pub uuid: Uuid,
|
||||||
#[var]
|
#[var]
|
||||||
ping: i32,
|
pub ping: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
#[derive(Clone, Debug, McBuf)]
|
||||||
pub struct UpdateDisplayName {
|
pub struct UpdateDisplayName {
|
||||||
uuid: Uuid,
|
pub uuid: Uuid,
|
||||||
display_name: Option<Component>,
|
pub display_name: Option<Component>,
|
||||||
}
|
}
|
||||||
#[derive(Clone, Debug, McBuf)]
|
#[derive(Clone, Debug, McBuf)]
|
||||||
pub struct RemovePlayer {
|
pub struct RemovePlayer {
|
||||||
uuid: Uuid,
|
pub uuid: Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl McBufReadable for Action {
|
impl McBufReadable for Action {
|
||||||
|
|
Loading…
Add table
Reference in a new issue