Call the sign edit interface?

Discussion in 'Plugin Development' started by Razorcane, Nov 21, 2011.

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

    Razorcane

    I'm trying to code a plugin that lets me edit signs by right clicking. I have the functions all set up and everything, but when I right click the sign it gives me a nullPointerException on this line:

    Code:
    for(int i = 0; i < 4; i++) targetState.setLine(i, lines[i]);
    I'm not sure where the Exception is coming from, and I may be doing this wrong, I've never worked with signs before.

    EDIT: I'm also trying to do this without using a BlockListener.
     
  2. Wouldn't you need Spout to do that? Pretty sure someone tried this before but with no luck.
     
  3. Offline

    Razorcane

    Spout is not an option. You can load the interface without Spout, I have a plugin that does it, but I'm trying to do mine in a slightly more interactive way.
     
  4. Offline

    bleachisback

    Then somewhere in the array "lines", index 0-3 is null

    EDIT: ah, yes below is true
     
  5. If the posted line is the top-most entry in the stack-trace, targetState is null (100% percent guaranteed).
    If the stack-trace continues on into the setLine method, one of the strings in "lines" is null.

    I assume it is the first situation, so it is important on where targetState is assigned.
     
Thread Status:
Not open for further replies.

Share This Page