Solved Change sign line

Discussion in 'Plugin Development' started by tkuiyeager1, Nov 13, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    tkuiyeager1

    I'm trying to create kind of sign editor for my plugin SignInColors, but i can't change the sign and it's not sending any errors.
    Code:java
    1. Block block = p.getTargetBlock((Set<Material>) null, 50);
    2. // More code that checks other things (example: if the block is a sign)
    3. Sign s = (Sign) block.getState();
    4. s.setLine(0, "test");
    5. // More code
     
  2. Offline

    teej107

  3. Offline

    tkuiyeager1

    Thank you @teej107 i forgot to update the BlockState.
     
Thread Status:
Not open for further replies.

Share This Page