Solved Sign Text

Discussion in 'Plugin Development' started by lavatheif, May 20, 2017.

Thread Status:
Not open for further replies.
  1. Im making a plugin that copies and pastes the hubs/ lobbys on my server and it works fine but it doesnt copy the text on the signs. I tried this but it doesnt work for me:
    Code:
                if(block.getType().equals(Material.SIGN_POST) || block.getType().equals(Material.WALL_SIGN)){
                    Sign s = (Sign) block.getState();
                    Sign s2 = (Sign) world.getBlockAt(l).getState();
                    String[] lines = s.getLines();
                    for(int q = 0; q < lines.length; q++){
                        s2.setLine(q, lines[q]);
                    }
                }
    
    nvm i tried calling s2.update(); and it works now
     
    Last edited: May 20, 2017
  2. Offline

    Zombie_Striker

    @lavatheif
    If your problem has been solved, mark this thread as solved.
     
Thread Status:
Not open for further replies.

Share This Page