Skip to content

fix: prevent sending sign paste messages if SignChangeEvent is cancelled #6136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from

Conversation

SrBedrock
Copy link
Contributor

@SrBedrock SrBedrock commented Apr 28, 2025

Information

This PR fixes no existing issue.

Details

Proposed fix:

Prevent sending messages related to sign text or copied lines when the SignChangeEvent has been cancelled.
Previously, even if the event was cancelled by another plugin, messages would still be sent to the player. This change ensures that no feedback about sign changes is given if the event does not proceed, maintaining correct plugin behavior and avoiding confusion.

Environments tested:

OS: Linux Ubuntu 20.04.6 LTS (Focal Fossa)

Java version: Java 21

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

  1. Use a plugin that cancels SignChangeEvent.
  2. Attempt to paste sign text.
  3. Notice that confirmation or copied text messages are sent if the event is cancelled.

@SrBedrock SrBedrock changed the title Block sign line edits if the event has been cancelled fix: prevent sending sign paste messages if SignChangeEvent is cancelled Apr 28, 2025
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