Solved How to create a sign?

Discussion in 'Spigot Plugin Development' started by SpiroMarshes, Jun 4, 2016.

  1. Hi,

    How do you create a sign next to an existing sign after it is placed?

    Code (Text):
        @EventHandler
        public void onSignChange(SignChangeEvent event)
        {
            if (event.getLine(0).equalsIgnoreCase("signCreation"))
            {
               // Create another sign here
            }
        }
    Thanks :)
     
  2. you mean if you write something in the sign like
    [hello] it will change the sign to Hey bro? (examples)
     
  3. Haha, no. That would be extremely simple and straight forward to do. I want to create ANOTHER sign next to the ORIGINAL sign.
     
  4. haha damn i thought you wanted to change the lines
     
  5. 1. Make a method that will tell you on what side of the block is sign placed the method can return string like "East", "North", ect.
    2. Than make if statement for all four sides and in it get the location of the sign.
    3. And than just change for example x, y or z by -1 or +1 depending on where do you want the sign to be placed.
    4. After all of that just set block on that location as sign with your text.
     
    • Useful Useful x 1
  6. some tips for u dude :):

    sign.update();

    Block block = w.getBlockAt(loc);
    Sign thesign = (Sign) block.getState()
    thesign.setLine(0, "Some text");
     
  7. Thanks for the information.

    Thanks, this was helpful.
     
  8. if im help u please leave ur like, agree o something u think :)
     
  9. Relax it's not facebook here to count the likes lol :p
     
    • Agree Agree x 1
  10. i mean valorate the help.. u dont understand nothing child
     
  11. I'm 19 dude don't call me child. And also he said "Thanks, this was helpful." what else you want from him?
     
    • Agree Agree x 2
  12. when you are old I do you'll realize that 19 years is to be a child. Besides age has nothing to do with maturity, you will have 19 but of mind got 10. I have 25. I intend to fight here, just do not miss me respect, to walk well
     
  13. what are you even talking about lol i just said what else you want the guy to tell you! you want an award or something i don't get it and you called me child and i told you i am 19 and now you say the age doesn't matter when you were the first who said about to do a like for no reason. And i don't respect people who don't respect me.
     
  14. *grabs popcorns* :D
     
    • Funny Funny x 1
  15. np. Stop spaming