Full width "space" or invisible character

Discussion in 'Spigot Plugin Help' started by AIDERMOI, May 15, 2015.

  1. I am trying to make my MOTD center itself.
    The problem im having is that the space character " " is about .75 of a full width character.

    The algorithm is correct ((53 - length of message) / 2) But since spaces are about .75 the width it breaks the whole thing.

    Does anyone know how to make a full width invisible character or space?
     
    #1 AIDERMOI, May 15, 2015
    Last edited: May 15, 2015
  2. That was easy, lol.
     
  3. Well Minecraft's space is not actually .25 that was a mistake. I apologize.

    It looks like its around .75 of a full width character

    EXAMPLE:
    [​IMG]

    Sorry for the false information.
    Thank you for the help
     
  4. You can get the space a tiny bit larger by making it bold, looks like the following:
    [​IMG]
    [​IMG]
    Second line (m&l &rm) has the bolding, it's off by just a little bit.
     
  5. Oh wow didn't even think of that, thank you very much.

    Although unfortunately it does add up:
    [​IMG]
     
  6. Spam the spaces untill it's right?
     
  7. Do some math to figure out how much extra space is lost and compensate by adding the missing spaces
     
  8. HPX is a player name, and thats going to change with every player.

    Im not sure if I understand what you are trying to say
     
  9. I was hoping for the solution to be end game because it takes 3 spaces to = 2 characters and those are not pretty numbers. Which will cause problems with certain names and such.

    But if there is no other way i guess thats my only option
     
  10. Did anyone find a good way to fix this? Its driving me insane.
    Im trying to use some ASCII art to display in chat, but the space system is absolutely terrible, they need to be the same distance as other characters, is there not a unicode blank space that is the same as a character?
     
  11. I use a few tips:
    z&l &l &l &l &l &l &lz
    Minecraft is a game creation xD
     
    #12 Darklight6626, Jul 25, 2016
    Last edited: Jul 31, 2016
    • Like Like x 1
  12. Yup, I made a near perfect text center method using that property. A space is 4 width and a bold space is 5 width and you can make any number > 12 with a combination of 4's and 5's. Ill post it in a bit.