Always get empty Optional when getting block data

Hi there,

I just started developing a plugin but i am stuck here:

I’d like to change the text of a sign when right clicking on it but when I try to get the SignData from that sign i always get an empty Optional as return. Even when I try to get the default state of that sign i get an empty Optional. Here is my code: http://pastebin.com/UvsqtVDQ
And here is the error I get: http://pastebin.com/1Hs0XwRJ
I bet there are a lot of things wrong in this code but I don’t know what is.
Any solutions?

Thanks.

This may steer you in the right direction.

@mmonkey Okay, i see what you did there. Now the sign changes but only when I disconnect and reconnect. Any way to tell the client that the sign has been updated?

Not really sure, I haven’t tried adding data to a sign after it has been set.

Looking at the implementation, it sets the new text but doesn’t update the connected players
https://github.com/SpongePowered/SpongeCommon/blob/master/src/main/java/org/spongepowered/common/data/processor/tileentity/SpongeSignDataProcessor.java#L97

It should be noted that the SignData processor is not ticked off on the following list so if it works at all, it’s only partially implemented.