[SPIGOT-1886] Reading lines from Sign BlockState results in empty string Created: 11/Mar/16 Updated: 12/Mar/16 Resolved: 11/Mar/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Martin | MiniDigger | Assignee: | Unassigned |
Resolution: | Invalid | Votes: | 0 |
Labels: | 1.9, blockstate, sign | ||
Environment: |
git-Spigot-b1c1b55-7d73fbb on windows 10 and ubuntu 14 (java 7 and 8) |
Description |
Steps to reproduce:
|
Comments |
Comment by Faris Rehman [ 12/Mar/16 ] |
Why wouldn't you just use e.getLine(0) instead... |
Comment by Martin | MiniDigger [ 12/Mar/16 ] |
Ah ok thank you. If I delay e.getBlock().getState().getLine(0) by a few ticks it works. |
Comment by Matthew Steglinski [ 11/Mar/16 ] |
This is intended behavior, the signs block state lines are only modified after SignChangeEvent executes and is not cancelled. The empty strings are as such because the sign is newly created and has nothing on them. SignChangeEvent#getLines returns what the lines will be set to if the event is not cancelled. |
Comment by Martin | MiniDigger [ 11/Mar/16 ] |
If I had the permission I would change the formatting but now you have to roll with that... |