Solved How to add invisible characters?

Discussion in 'Spigot Plugin Development' started by abdrnasr, Sep 13, 2017.

  1. Now iam trying to do this
    Code (Text):
    String text="§1§2Hi";
    But the problem is that the first color is ignored for no reason.

    Even when I used this too

    Code (Text):
    String text="§1Hi§2";
    the last color is ignored too.
     
  2. how about text = "§§1Hi, invis char at start";
     
  3. md_5

    Administrator Developer

    Coloring nothing will display nothing.
    Can I introduce you to the space character? " ". It's pretty easy to use and rather invisible
     
    • Winner Winner x 6
    • Funny Funny x 3
  4. I used
    Code (Text):
    String text="§§§2Hi";
    And it worked.
     
  5. Nah i will use it for safety reasons.To add it before the first line of a sign so normal players can't get the Exact string.For example:
    "§§§aHi" is never like "§aHi"
     
  6. md_5

    Administrator Developer

    Pretty sure players can still make signs like that unless you block them with the sign edit event
     
  7. MiniDigger

    Supporter

    I think a book is the only location where you can input the section sign without the use of a plugin/mod/external editor.
     
  8. Yep but because it is invisible they dont know that it is there.
     
  9. You can store the sign location when is correctly placed, it shouldn't really affect performance and would also prevent players from creating their own signs also it would be better to manage all the signs you have.
     
  10. i thought about that before but it might need too much more effort.