pmmp / PocketMine-MP

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

Player can fly after respawn if player was flying #4341

Closed alvin0319 closed 3 years ago

alvin0319 commented 3 years ago

Issue description

https://user-images.githubusercontent.com/32565818/127770789-68aca26d-5745-4074-91b5-3d467fb19b75.mp4

Steps to reproduce the issue

  1. Join the server.
  2. Change gamemode to creative, or make player can fly.
  3. kill yourself using /kill command or something else.

OS and versions

Plugins

N/A

Crashdump, backtrace or other files

alvin0319 commented 3 years ago

This also can be reproduced in Win10 edition.

There is no code such as setFlying(false) on respawn sequence.

https://github.com/pmmp/PocketMine-MP/blob/041d3141900541decdff0a9b88ccfd871d3d34a9/src/player/Player.php#L2104#L2137

dktapps commented 3 years ago

Fixed for 4.0.