mirror of
https://github.com/Tribufu/rust-gamedig
synced 2026-08-09 07:01:06 +00:00
Protocol: Minecraft: Rename players-related fields
This commit is contained in:
parent
4fb1350753
commit
f2ae81002e
7 changed files with 24 additions and 24 deletions
|
|
@ -83,8 +83,8 @@ impl Bedrock {
|
|||
name: status[1].to_string(),
|
||||
version_name: status[3].to_string(),
|
||||
version_protocol: status[2].to_string(),
|
||||
max_players: status[5].parse().map_err(|_| TypeParse)?,
|
||||
online_players: status[4].parse().map_err(|_| TypeParse)?,
|
||||
players_maximum: status[5].parse().map_err(|_| TypeParse)?,
|
||||
players_online: status[4].parse().map_err(|_| TypeParse)?,
|
||||
id: status.get(6).and_then(|v| Some(v.to_string())),
|
||||
map: status.get(7).and_then(|v| Some(v.to_string())),
|
||||
game_mode: match status.get(8) {
|
||||
|
|
|
|||
|
|
@ -110,9 +110,9 @@ impl Java {
|
|||
Ok(Response {
|
||||
version_name,
|
||||
version_protocol,
|
||||
max_players,
|
||||
online_players,
|
||||
sample_players,
|
||||
players_maximum: max_players,
|
||||
players_online: online_players,
|
||||
players_sample: sample_players,
|
||||
description: value_response["description"].to_string(),
|
||||
favicon: value_response["favicon"].as_str().map(str::to_string),
|
||||
previews_chat: value_response["previewsChat"].as_bool(),
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ impl LegacyBV1_8 {
|
|||
Ok(Response {
|
||||
version_name: "Beta 1.8+".to_string(),
|
||||
version_protocol: -1,
|
||||
max_players,
|
||||
online_players,
|
||||
sample_players: None,
|
||||
players_maximum: max_players,
|
||||
players_online: online_players,
|
||||
players_sample: None,
|
||||
description,
|
||||
favicon: None,
|
||||
previews_chat: None,
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ impl LegacyV1_4 {
|
|||
Ok(Response {
|
||||
version_name: "1.4+".to_string(),
|
||||
version_protocol: -1,
|
||||
max_players,
|
||||
online_players,
|
||||
sample_players: None,
|
||||
players_maximum: max_players,
|
||||
players_online: online_players,
|
||||
players_sample: None,
|
||||
description,
|
||||
favicon: None,
|
||||
previews_chat: None,
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ impl LegacyV1_6 {
|
|||
Ok(Response {
|
||||
version_name,
|
||||
version_protocol,
|
||||
max_players,
|
||||
online_players,
|
||||
sample_players: None,
|
||||
players_maximum: max_players,
|
||||
players_online: online_players,
|
||||
players_sample: None,
|
||||
description,
|
||||
favicon: None,
|
||||
previews_chat: None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue