pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.27k stars 1.54k forks source link

Player cannot connect to server when default gamemode is 3 #4069

Closed leolee3914 closed 3 years ago

leolee3914 commented 3 years ago

Issue description

Steps to reproduce the issue

  1. set gamemode=3 in server.properties
  2. start the server and try to connect

OS and versions

Plugins

Crashdump, backtrace or other files

DaisukeDaisuke commented 3 years ago

This is a video that reproduces this problem. https://youtu.be/J2yhUZ_f3HY

open images related to this issue
![20210313-154950-157](https://user-images.githubusercontent.com/17798680/111022094-09967600-8414-11eb-8973-7ff326121364.jpg) ![20210313-155015-282](https://user-images.githubusercontent.com/17798680/111022092-07ccb280-8414-11eb-8417-fba04e79cbaa.jpg) ![20210313-155034-540](https://user-images.githubusercontent.com/17798680/111022093-08fddf80-8414-11eb-9809-589b134e7ccf.jpg)
DaisukeDaisuke commented 3 years ago

There is a possibility that it is incorrect, but it seems that this problem does not occur if the following character string is set to something other than "Spectator". https://github.com/pmmp/PocketMine-MP/blob/ccc76cf33852fad3e0cca8ab805b8b15cd503f76/src/pocketmine/Server.php#L491 https://github.com/pmmp/PocketMine-MP/blob/ccc76cf33852fad3e0cca8ab805b8b15cd503f76/src/pocketmine/Server.php#L482-L492 May be involved. https://github.com/pmmp/PocketMine-MP/blob/74bef7f4237dfaf5d80af2d0a493944ade1fd068/src/pocketmine/network/mcpe/RakLibInterface.php#L205-L215

dktapps commented 3 years ago

This is probably because of the client validating the pong fields. This is so stupid, it isn't even visible on the UI ...