MinecraftForge/MinecraftForge — pull request #1459 by luacs1998 (2014-10-16 04:41:04+00:00)
Title: SignEditEvent

This event allows mods to manipulate sign text at edit time. This is useful for serverside mods to define coloured text, censor unacceptable words, etc, like what is possible in ServerChatEvent. Mods providing custom signs are expected to manually throw this event.

The text field is an array containing the 4 lines of text that should be written to the sign. You'll want to modify this. This array may be larger than 4 lines, if thrown by a mod providing custom signs.

The additional parameters are for protection plugins to determine whether the sign should be edited.

I apologise for the size of the NetHandlerPlayServer patch, however it is required to actually apply the edited text to the sign. This is because the server does not allow me to modify the data contained within the packet, so I must copy out the data from the packet and expose the copied data to the event.

This is a re-pull of PR #1404, targeting the master branch.