From 50d9e51d3f6a18d4d384f39e4216186116595cec Mon Sep 17 00:00:00 2001 From: Ghoulboy Date: Sun, 9 Jan 2022 00:07:45 +0100 Subject: [PATCH] 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> --- src/main/java/carpet/commands/PlayerCommand.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/carpet/commands/PlayerCommand.java b/src/main/java/carpet/commands/PlayerCommand.java index 69dcce4b..b4255503 100644 --- a/src/main/java/carpet/commands/PlayerCommand.java +++ b/src/main/java/carpet/commands/PlayerCommand.java @@ -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()))