Fake players can be spawned in survival mode while flying (#1264)

* Fixes #1263

* Update src/main/java/carpet/commands/PlayerCommand.java

Co-authored-by: James103 <37945304+James103@users.noreply.github.com>

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
Co-authored-by: James103 <37945304+James103@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2022-01-09 00:07:45 +01:00
1 parent 34e32973fa
commit 50d9e51d3f
1 file changed
+3
@@ -299,6 +299,9 @@ public class PlayerCommand
{
// Force override flying to true for spectator players, or they will fell out of the world.
flying = true;
} else if(mode.isSurvivalLike()){
// Force override flying to false for survival-like players, or they will fly too
flying = false;
}
String playerName = StringArgumentType.getString(context, "player");
if (playerName.length()>maxPlayerLength(source.getServer()))