Skip to content

GH-422 Keep combat tag active below void height to prevent evasion - #422

Merged
vLuckyyy merged 2 commits into
masterfrom
void-combat-persistence
Aug 17, 2026
Merged

GH-422 Keep combat tag active below void height to prevent evasion#422
vLuckyyy merged 2 commits into
masterfrom
void-combat-persistence

Conversation

@vLuckyyy

Copy link
Copy Markdown
Member

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 35e19d0eed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +41 to +42
if (this.config.combat.keepCombatActiveInVoid && player.getLocation().getY() < this.config.combat.voidCombatHeight) {
FightTagEvent tagEvent = this.fightManager.tag(playerUniqueId, this.config.settings.combatTimerDuration, CauseOfTag.VOID, fightTag.getTagger());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check expiration before refreshing the void tag

When the tag timestamp expires between the task's one-second runs and the player crosses below the configured height during that interval, the expired tag is still present in getFights(), so this call replaces it with a fresh full-duration tag before the later isExpired() check. Since FightManager.isInCombat() already returns false once the timestamp passes, this re-enters a player into combat rather than merely keeping an active tag alive; reject expired tags before applying the void refresh.

Useful? React with 👍 / 👎.

Comment on lines +41 to +42
if (this.config.combat.keepCombatActiveInVoid && player.getLocation().getY() < this.config.combat.voidCombatHeight) {
FightTagEvent tagEvent = this.fightManager.tag(playerUniqueId, this.config.settings.combatTimerDuration, CauseOfTag.VOID, fightTag.getTagger());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor ignored worlds before refreshing void tags

When an already-tagged player teleports into a world listed in settings.ignoredWorlds and remains below voidCombatHeight, this path keeps resetting the tag indefinitely because it never applies the ignored-world predicate used by the damage taggers. Such players remain subject to combat restrictions and logout punishment even though the configuration says players in those worlds are unaffected, so skip the refresh when the player's current world is ignored.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc11f46275

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (this.config.combat.keepCombatActiveInVoid
&& player.getLocation().getY() < this.config.combat.voidCombatHeight
&& !this.config.settings.ignoredWorlds.contains(player.getWorld().getName())) {
FightTagEvent tagEvent = this.fightManager.tag(playerUniqueId, this.config.settings.combatTimerDuration, CauseOfTag.VOID, fightTag.getTagger());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid replaying tag-start side effects on every void refresh

When this option is enabled and a tagged player remains below the configured height, FightTask invokes tag once per second, which synchronously publishes a normal FightTagEvent. Existing listeners do not distinguish CauseOfTag.VOID: for example, KnockbackRegionController.onTag knocks the player again when they are inside a configured region, while BorderTriggerController recomputes the border and external API listeners may treat every refresh as a new tag. Refresh the deadline without replaying tag-start behavior, or make the affected listeners explicitly ignore refresh events.

Useful? React with 👍 / 👎.

@vLuckyyy vLuckyyy changed the title Keep combat tag active below void height to prevent evasion GH-422 Keep combat tag active below void height to prevent evasion Aug 17, 2026
@vLuckyyy
vLuckyyy merged commit 5b4f9d1 into master Aug 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant