Fix disconnect message not being shown on client · feather-rs/feather@1eea64c · GitHub
Skip to content

Commit 1eea64c

Browse files
committed
Fix disconnect message not being shown on client
1 parent cc68803 commit 1eea64c

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

server/config/feather.toml

Lines changed: 2 additions & 2 deletions

server/src/initialhandler.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl InitialHandler {
120120
fn get_status_response(&self) -> String {
121121
let json = json!({
122122
"version": {
123-
"name": "1.13.2",
123+
"name": "Feather 1.13.2",
124124
"protocol": PROTOCOL_VERSION,
125125
},
126126
"players": {
@@ -243,7 +243,9 @@ impl InitialHandler {
243243
}
244244

245245
pub fn disconnect_login(&mut self, reason: &str) {
246-
let packet = DisconnectLogin::new(reason.to_string());
246+
let packet = DisconnectLogin::new(json!({
247+
"text": reason
248+
}).to_string());
247249
self.send_packet(packet);
248250
self.should_disconnect = true;
249251
}

server/src/player.rs

Lines changed: 5 additions & 5 deletions

0 commit comments

Comments
 (0)