Sign not working.

Discussion in 'Plugin Development' started by TotallyNotWalshy, Sep 22, 2014.

Thread Status:
Not open for further replies.
  1. I am making a sign plugin and it isn't getting the line.

    Code:
    Code:java
    1. @EventHandler
    2. public void onSignCreate(SignChangeEvent e){
    3. Block block = e.getBlock();
    4.  
    5. if(block.getState() instanceof Sign){
    6. Sign sign = (Sign) block.getState();
    7. if(sign.getLine(0).equalsIgnoreCase("[SellAll]")){
    8. sign.setLine(0, ChatColor.RED + "Sell");
    9. sign.update();
    10. e.getPlayer().sendMessage("HELLO LADDY!");
    11. }
    12. }
    13. }


    Line which isn't working:
    Code:java
    1. if(sign.getLine(0).equalsIgnoreCase("[SellAll]")){


    I know it is that line because I debugged it.
     
  2. Offline

    teej107

  3. teej107 Ah that worked thanks.
     
  4. Offline

    CodeOne

    Lol you're special
     
Thread Status:
Not open for further replies.

Share This Page