JsonMessage API 2.3.0

A single class API enabling full control over json messages to be sent in chat

  1. Eliminating NMS Usage for 1.16+ Support

    JustisR
    For the sake of ensuring compatibility across all future NMS code changes, I’ve eliminated the usage of NMS entirely and switched to internally calling the tellraw command.

    Since the tellraw command was only added in 1.7.2, version support for prior Minecraft versions has been dropped, but it’s a small price to pay, considering how few servers still run at such old versions.
  2. Respecting Style Codes

    JustisR
    In previous versions, style codes (bold, italic, underline, magic, strikethrough, reset) weren’t properly respected.

    This version will convert these codes into their respective JSON settings without interfering with colors.

    Apologies that this patch was so delayed. Admittedly, I do very little plugin development these days, and so I do rely on receiving messages from my library users if there’s a potential issue.

    Stay warm and healthy.
  3. The prodigal son returns

    JustisR
    Anyone who's ever worked with Json Messages in Minecraft will know that a long time ago, Mojang's good work broke Json chat message colors when the client splits the message into a new line on their screen for longer messages.
    It's about time I made an update to JsonMessage that removes chat color codes from the raw text, and utilizes the "color" attribute as Mojang wants.
    However, fear not. The methods for creating colorized Json chat messages has not changed. Input the chat messages as you...
  4. Redirect to MCMarket for synchronized updates

    JustisR
    - nvm- apparently, you cannot switch download links once the resource has been created.
  5. Fixed all version incompatibilities above 1.6

    JustisR
    Fixed version incompatibilities.
    Now tested for 1.6, 1.7, 1.8, 1.9, and 1.10

    Refactored and simplified unaccessed areas of the source.
  6. Added support for Spigot hack versions

    JustisR
    The previous update of this API utilized apache's StringEscapeUtils for escaping unescaped json strings inputted by the user.
    The spigot hack is missing a lot of imports, including this one.

    This current version uses the JsonObject class, which is available in the spigot hack's imports, and will therefore work for both.
    Krumb069 likes this.
  7. Added support for unescaped user inputs

    JustisR
    We all make mistakes.
    This update will help to catch yours, if you ever find yourself having inputted some unescaped text into the json builder.
    Krumb069 likes this.