Skip to content

Conversation

@Pirgosth
Copy link
Contributor

Information

This PR fixes #4665 .

Details

Proposed fix:

There was already a partial fix for this (#4667) but the same improvement was missing for the else statement of the shouldFly function in LocationUtil.

We can now login below y=0 (tested with y=-63) and it does not enable fly mode if the player is actually in a safe location. It also fixed the safelogin when falling into the void for y <= -64 for versions >= 1.18.
It does not break backward compatibility for older versions of Minecraft.

Environments tested:

OS: Fedora 35

Java version: "17.0.1" 2021-10-19 LTS

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8
  • Spigot 1.18.1 (CraftBukkit version 3368-Spigot-8965a50-2a2caa7 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT))

Demonstration:

As you can see we are no longer in fly mode just after logged in. (I ensure myself that fly mode was disabled before logging in back)

2021-12-26_21 33 48

2021-12-26_21 34 05

Copy link
Member

@pop4959 pop4959 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good but some minor comments, otherwise LGTM.

@pop4959 pop4959 added module: main Issues or PRs for the main Essentials module type: bugfix PRs that fix bugs in EssentialsX. labels Dec 26, 2021
@pop4959 pop4959 enabled auto-merge (squash) December 26, 2021 23:50
@pop4959
Copy link
Member

pop4959 commented Dec 26, 2021

Thanks, appreciate the bugfix :)

@Pirgosth
Copy link
Contributor Author

Pirgosth commented Dec 26, 2021

Thanks, appreciate the bugfix :)

It was a pleasure, hope I'll have other opportunities to contribute to these projects :)

@pop4959 pop4959 merged commit 739600e into EssentialsX:2.x Dec 26, 2021
ressidell pushed a commit to ressidell/Essentials that referenced this pull request Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: main Issues or PRs for the main Essentials module type: bugfix PRs that fix bugs in EssentialsX.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Under y=0 Fly gets reenabled automatically

2 participants