Bukkit/CraftBukkit — pull request #1345 by CelticMinstrel (2014-02-22 22:00:25+00:00)
Title: Add openSign method and trigger event on illegal sign change

**Description and Justification**

1. It's now possible to request a sign window from the client side, so I've added an openSign() method to HumanEntity that does this. Since the primary use would be for plugins that allow users to edit signs, such as my SimpleSignEdit, I also mark the sign as editable so that the sign change packet the client sends when the window is closed won't be rejected.

2. I also slightly modified the triggering of sign change events to trigger the event even if the sign change is considered to be "illegal", ie if it refers to a non-editable sign. In this case the event is triggered pre-cancelled, but a plugin could subsequently uncancel it.

Point 2 was initially an alternative to marking the sign as edited for point 1. I tested the openSign method in in SimpleSignEdit, in conjunction with the modified sign change event triggering, and it worked quite well. I haven't yet tested the process of marking the sign as editable.

**Tickets**

Coming soon!

**Note**

The first commit in this branch can be considered optional. The fourth, however, is almost entirely useless without the first, as there would be no way to get the output from the sign window if you passed false.