Paper
Paper copied to clipboard
Player Edit Sign Event
Is your feature request related to a problem?
Cancelling PlayerInteractEvent might be limiting because there's a somewhat complicated logic for determining which side of sign the player clicked. (See nms SignBlockEntity#isFacingFrontText)
Describe the solution you'd like.
A event that triggers when a player tries to edit a sign. With a way to get which side of the sign is being clicked. Cancel the event to do nothing when clicked (don't open the sign edit screen)
Edit: After seeing @lynxplay's idea, this event maybe should also trigger after placing the sign. Cancelling the event would not open the sign edit screen when placed.
Describe alternatives you've considered.
I mean, I can copy the nms logic in my plugin code but that's kinda bad
Other
No response
Would also be in favour of this as it would allow plugins to nicely cancel the SignOpenScreen hammered in when placing a sign, which was/is an issue during initial placement.
SignChangeEvent is called when the client sends the actual update, this event would be called when the server opens the Sign editing screen to the player when they interact with the sign.