1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

API [Abandoned] json.sk 2.3

A fix for SkQuery's JSON messages for 1.8.3+ (and 1.9.x - 1.11.x) servers.

  1. Rezz
    Supported Minecraft Versions:
    • 1.8
    This script is no longer maintained and is considered deprecated. Use Skript's own builtin JSON text (found here: https://skriptlang.github.io/Skript/text.html).

    This resource's original (outdated) description is below.

    This script is intended for use with the Skript plugin (version 2.2)
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG] __ [​IMG]

    [​IMG]
    Usage:

    If you don't know how to use Skript 2.2's functions, please view this tutorial.
    Make sure this script loads before all other scripts in order to access its functions!

    • json()
      • json("<recipient>", "<json text in json.sk notation>")
      • Sends a json formatted message to the recipient (accepts @a)
      • Alternative:
        • json("<recipient>", "<text in json.sk-notation>", <OPTIONAL: color codes boolean>)
        • By default, color codes will be converted. If the color codes boolean argument is set to false, json.sk won't convert color codes.
    • jsonFormat()
      • jsonFormat("<text in json.sk notation>")
      • Returns a /tellraw formatted json from the input json.sk notation text.
    • jsonColor()
      • jsonColor("<text>")
      • This function is used by the other json functions to reformat the color codes within the message.
    • jsonSanitize()
      • jsonSanitize("<text>")
      • Returns json-safe text (cancels out all quotation marks)
    • removeColor()
      • removeColor("<text>")
      • Returns text with all & color codes removed.
      • Note: this function will not remove color codes that are already converted (not in &# format anymore).

    [​IMG]

    All possible effect tags:

    • ttp:
      • Appends a hoverable tooltip
    • cmd:
      • Appends a clickable command
      • If not slash is included at the start (/), players will chat a message instead.
    • sgt:
      • Appends a clickable suggestion
      • May be any text (including commands)
    • url:
      • Appends a clickable url
      • If no http:// or https:// is included, json.sk will include http:// automatically
    • ins:


    [​IMG]


    Examples:

    Code (Text):
    1. command /jsontest:
    2.     trigger:
    3.         json("%player%", "&7&oHello, this is a &bsample json&7.||ttp:&bI'm a tooltip for the first cluster.|| There's no tag, so I've started a new cluster.||cmd:/ping||ttp:&6&o&lCLICK&f for /ping")
    4. #           |_________|  ||___________________________________|  |________________________________________||||_____________________________________________|  |_______|  |_________________________||
    5. #            recipient   |            Average Text                                Tooltip                  ||                 Average Text                   Run Command           Tooltip          |
    6. #                        |_________________________________________________________________________________||_______________________________________________________________________________________|
    7. #                                                       JSON Cluster #1                                                                           JSON Cluster #2
    8.  
    Results:
    [​IMG]
    [​IMG]

    Code (Text):
    1. command /jsonformattingtest:
    2.     trigger:
    3.         message jsonFormat("I'd love it if this had a hover effect!||ttp:&oOh look, it does!||sgt:/randomcommand")
    Results:
    [​IMG]



    [​IMG]


    Json.sk compared to SkQuery Syntax:

    Example 1:

    SkQuery: (broken on spigot 1.8.3+)
    Code (Text):
    1. loop all players:
    2.     send json of "Have a lovely day!" tooltip "&cClick here for some cake! <3" suggest "/i lied" to loop-player
    json.sk: (works with Skript 2.2)
    Code (Text):
    1. json("@a", "Have a lovely day!||ttp:&cClick here for some cake! <3||sgt:/i lied")

    Example 2:
    SkQuery: (broken on spigot 1.8.3+)
    Code (Text):
    1. send json of "Hello..." then " ;)" tooltip " ;D" to player
    json.sk: (works with Skript 2.2)
    Code (Text):
    1. json("%player%", "Hello...|| ;)||ttp: ;D")

Recent Reviews

  1. CyberAlon
    CyberAlon
    5/5,
    Version: 2.3
    Excellent skript. Helped me with my anti-cheat I'm making. Thanks so much!
  2. FireRoz
    FireRoz
    5/5,
    Version: 2.3
    casually saving time for 2,531 people thank you. This allows you to really do whatever with skript. The best thing, it's not gonna spam your console with errors!
  3. Minecoll_YT
    Minecoll_YT
    5/5,
    Version: 2.3
    I love it <3! It's better than the /tellraw command!
  4. Ayham Alali
    Ayham Alali
    5/5,
    Version: 2.3
    I don't know why I didn't review this before! I've been using this for a very long time now, It's PERFECTLY MADE. You made me love JSON ♥
  5. Renderman
    Renderman
    5/5,
    Version: 2.3
    This is a great skript to use, brings back awesome Json features and adds no lag at all! Amazing!
  6. iDarkyy
    iDarkyy
    5/5,
    Version: 2.3
    Awesome jason skropt its da best itv tever seon
    Its actually really good..
  7. WheezyGold7931
    WheezyGold7931
    5/5,
    Version: 2.3
    Can I get uhhhhhhhhhh. BONELESS JSON with a 2 litter of clusters
  8. Syst3ms
    Syst3ms
    5/5,
    Version: 2.3
    A must-have (I totally didn't download it just to post this review)
  9. BrettPlayMC
    BrettPlayMC
    5/5,
    Version: 2.3
    I like Jason. :)
  10. Snow-Pyon
    Snow-Pyon
    5/5,
    Version: 2.3
    One of the best scripts ever seen, nice as the developer of it, thanks for make this public.