Skip to content

GH-394 Add combat sign editing blocker#394

Closed
vLuckyyy wants to merge 1 commit into
masterfrom
codex-sign-editing-combat-traps
Closed

GH-394 Add combat sign editing blocker#394
vLuckyyy wants to merge 1 commit into
masterfrom
codex-sign-editing-combat-traps

Conversation

@vLuckyyy

Copy link
Copy Markdown
Member

No description provided.

@vLuckyyy vLuckyyy changed the title Add combat sign editing blocker GH-394 Add combat sign editing blocker Jun 15, 2026

@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, specifically addressing sign traps that block ender pearl throws. It adds the SignEditingBlocker listener, configuration settings under SignEditingSettings, and corresponding unit tests. The review feedback recommends adjusting the event handler priority to EventPriority.LOW to ensure that other protection plugins (such as WorldGuard) can properly override the interaction states if needed.

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.

Comment on lines +9 to +11
import org.bukkit.event.EventHandler;
import org.bukkit.event.Event.Result;
import org.bukkit.event.Listener;

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.

medium

Import EventPriority to support setting a lower priority on the event handler.

Suggested change
import org.bukkit.event.EventHandler;
import org.bukkit.event.Event.Result;
import org.bukkit.event.Listener;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Event.Result;
import org.bukkit.event.Listener;

Comment on lines +26 to +27
@EventHandler
void onInteract(PlayerInteractEvent event) {

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.

medium

To prevent potential bypasses of region protection or other plugins that restrict Ender Pearl usage (e.g., WorldGuard region flags banning pearls), it is highly recommended to run this event handler at a lower priority like EventPriority.LOW. This ensures that SignEditingBlocker sets its default allowed/denied states first, allowing other protection plugins running at NORMAL or higher to override them if necessary.

Suggested change
@EventHandler
void onInteract(PlayerInteractEvent event) {
@EventHandler(priority = EventPriority.LOW)
void onInteract(PlayerInteractEvent event) {

@vLuckyyy vLuckyyy closed this Jun 15, 2026
@vLuckyyy vLuckyyy deleted the codex-sign-editing-combat-traps branch June 15, 2026 20:47
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