Read Sign Data when it is created

Discussion in 'Plugin Development' started by giodamelio, May 26, 2011.

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

    giodamelio

    I am using the onBlockPlace event with some code like this to see if it is a sign being placed.
    Code:
    if (block.getState() instanceof Sign) {
        //block is a sign
    } else {
        //block is not a sign
    }
    
    The problem is, the function onBlockPlace is called when the player places the sign not when the click the done button after adding the text. How can I read the text of any new sign?

    Thanks, giodamelio

    After a closer look at the bukkit javadocs, I noticed the SingChangedEvent. That was exactly what I needed :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
Thread Status:
Not open for further replies.

Share This Page