Update AntiAFK.java#6533
Open
fapotaa wants to merge 1 commit into
Open
Conversation
This modification improves the Anti-AFK module to be safer when wearing an Elytra. The Problem: The module's random jump feature could trigger two consecutive jumps within a very short time frame (less than 0.75 seconds). This would accidentally activate the Elytra mid-air, causing the player to start flying and slowly drift away from their original position. Over time, this could lead to falling off high ledges or moving into dangerous areas while AFK. The Solution: - Added a cooldown system between random jumps. - The minimum interval between any two jumps is now 1 full second (20 ticks). - This interval is longer than the total duration of a single jump in Minecraft (0.75 seconds), ensuring that two jumps cannot occur while the player is still in the air. The Result: - Elytra cannot be accidentally activated by back-to-back jumps. - The player stays completely stationary and safe while AFK.
Powie69
suggested changes
Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Description
This PR fixes an issue where the Anti-AFK module's random jump feature could accidentally activate Elytra flight when two consecutive jumps occurred within a short time frame.
The Problem:
When wearing an Elytra, two jumps happening in quick succession (within < 0.75 seconds) would trigger the Elytra to activate mid-air. This caused the player to start flying and slowly drift from their original position. Over extended AFK periods, this could lead to:
The Solution:
Added a cooldown system between random jumps:
Technical Implementation: