Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,15 @@ private void joinFlow(final User user, final long currentTime, final String mess
if (!inWater && LocationUtil.shouldFly(ess, user.getLocation())) {
user.getBase().setAllowFlight(true);
user.getBase().setFlying(true);
// The client sends a flight-abilities sync shortly after joining, which resets the flying state
// and drops the player out of the air. Re-apply the flight state a tick later so it sticks and the
// player keeps flying instead of falling (see the equivalent world-change handling below).
ess.scheduleSyncDelayedTask(() -> {
if (user.getBase().isOnline()) {
user.getBase().setAllowFlight(true);
user.getBase().setFlying(true);
}
}, 1);
if (!restoreFly && ess.getSettings().isSendFlyEnableOnJoin()) {
user.sendTl("flyMode", CommonPlaceholders.enableDisable(user.getSource(), true), user.getDisplayName());
}
Expand Down