[UTILITY] Center your chat messages!

Discussion in 'Spigot Discussion' started by myokan, Sep 27, 2019.

  1. I wasn't sure if this necessary belonged here but it's not exclusively a programming resource (it will help all server owners), so I decided to post here.

    [​IMG]

    I've created a web utility based on this code to center chat messages. It's very convenient if you are wanting to send centered broadcasts, announcements, join messages, etc. but the plugin you are configuring does not have the center utility built in.

    Here's the resource: https://quadrex.org/center.

    If you really get into what you can use this for, you can center server list MOTDs and even lores/names from items (you just need to guess and check what the width of a message is).


    Let me know if you have any feedback or suggestions :). Technically this is the second version of it but I rewrote it to be faster, easier to use, and better for power users).
     
    #1 myokan, Sep 27, 2019
    Last edited: Sep 27, 2019
    • Useful Useful x 3
    • Like Like x 1
  2. I'm guessing this would only center it for default Minecraft with default chat settings?

    Edit:
    Eg if they had a resourcepack with slightly different chat character sizes
     
  3. That's correct. Each resource pack has its own font sizes which means that it would not be compatible. Luckily it tends to be "close enough" so that players don't care (that's what we've seen on the large network I work for at least).

    Either way, for most cases, it's very useful :)