When being teleported into the air, a server with flying disabled will kick you for flying in survival/adventure mode.
Steps to reproduce:
Create a server with
allow-flight=false
Enter the server
Use
/gamemode survival /setblock ~ ~-1 ~ chain_command_block{auto:1b,Command:"teleport @p ~ ~3 ~"} /setblock ~ ~ ~ repeating_command_block[facing=down]{auto:1b,Command:"teleport @p ~ 0 ~"}
Wait for a few seconds
-> ❌ Get kicked for flying
Expected behavior:
Since it's a command the server (via functions or command blocks) is running, the "fly timer" should be reset.
I can confirm this in 1.20.4 and attached a video demonstrating the bug.