File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ default_gamemode = "survival"
1818difficulty = " none"
1919view_distance = 6
2020address = " 127.0.0.1"
21- port = 25565
21+ port = 25567
2222
2323[gameplay ]
2424monster_spawning = true
@@ -29,4 +29,4 @@ nerf_spawner_mobs = false
2929pvp_style = " classic"
3030
3131[log ]
32- level = " trace"
32+ level = " trace"
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change @@ -123,11 +123,6 @@ impl PlayerHandle {
123123 ) -> Result < ( ) , ( ) > {
124124 let r = self . initial_handler . handle_packet ( packet) ;
125125
126- if r. is_err ( ) {
127- self . should_remove = true ;
128- self . close_connection ( ) ;
129- }
130-
131126 for action in self . initial_handler . actions ( ) {
132127 match action {
133128 ih:: Action :: SendPacket ( packet) => self . send_packet_boxed ( packet) ?,
@@ -144,6 +139,11 @@ impl PlayerHandle {
144139 }
145140 }
146141
142+ if r. is_err ( ) {
143+ self . should_remove = true ;
144+ self . close_connection ( ) ;
145+ }
146+
147147 if self . initial_handler . finished {
148148 // Run the play sequence to allow the player
149149 // to join
You can’t perform that action at this time.
0 commit comments