Skip to content

GH-395 Add combat sign editing blocker - #395

Merged
vLuckyyy merged 3 commits into
masterfrom
sign-editing-combat-traps
Aug 17, 2026
Merged

GH-395 Add combat sign editing blocker#395
vLuckyyy merged 3 commits into
masterfrom
sign-editing-combat-traps

Conversation

@vLuckyyy

Copy link
Copy Markdown
Member

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a feature to prevent players from editing signs during combat, addressing issues with sign traps that block ender pearl throws. It adds a new SignEditingBlocker listener, configuration settings, and corresponding unit tests. The review feedback highlights a potential issue where the blocker could bypass region protections or override other item restrictions (like ender pearl cooldowns). It suggests adding ignoreCancelled = true to the event handler and checking the current item use result before allowing it.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@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: 57f8c9e452

ℹ️ 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".


ItemStack item = event.getItem();
if (item != null && isEnderPearl(item.getType())) {
event.setUseItemInHand(Result.ALLOW);

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 Preserve prior item-use denials when allowing pearls

When this blocker runs for a combat player holding an ender pearl, it unconditionally changes the item result to ALLOW. PlayerInteractEvent can already have an item-use DENY from an earlier listener (for example a protected region or item blacklist), and this line overrides that denial on sign clicks, letting the pearl launch where another plugin intentionally blocked it. Only force ALLOW if the current item result is not DENY, or otherwise preserve existing cancellation state.

Useful? React with 👍 / 👎.

@vLuckyyy vLuckyyy changed the title Add combat sign editing blocker GH-395 Add combat sign editing blocker Aug 17, 2026
@vLuckyyy
vLuckyyy merged commit d2aa5df into master Aug 17, 2026
1 check passed
@vLuckyyy
vLuckyyy deleted the sign-editing-combat-traps branch August 17, 2026 18:57
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