Get Sign Lines

Discussion in 'Plugin Development' started by ClockWorksMC, Sep 26, 2014.

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

    ClockWorksMC

    So I want players to be able to recieve kits from signs just like essentials, but in essentials does not allow me to put on armor and I'm trying to move away from essentials in the first place. My first line is hopefully (without the quotes) "(kit)" and the second one is "(pvp)". Any help?
     
  2. Offline

    blobic123

  3. Offline

    CoolGuy2001

    Use a PlayerInteractEvent, and check if the state of the right-clicked block is a sign. Then check if the first line of the sign says [Kit]. Now you can check the second line!

    Code:
    Sign s = (Sign) e.getClickedBlock().getState();
    String one = s.getLine(0);
    //Use that line
     
Thread Status:
Not open for further replies.

Share This Page