Could this be?

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

JuanDouCore_

New Member
May 20, 2017
7
0
0
23
I want to know if there is any possible event in skript to click on words in the chat and the player executes commands, or sends commands or other things etc.
For example: The most typical in minecraft is to click on the links in the chat, but in this case I want to know if you can deal with words.
 
Yes. You're going to want to download json.sk. you can find it here along with an in-depth documentation:
https://www.spigotmc.org/resources/json-sk.8851/
Here is a snippet of my chat skript that uses it in case you want some examples::
code_language.skript:
on chat:
    cancel event
    set {_chatcooldown} to difference between {chatcooldown.last.%player%} and now
    if {_chatcooldown} is less than 30 seconds:
        if {chatmessage.%player%} is equal to "%message%":
            send "&e&l[&d&l!&e&l] &r&7That's the same as your last message. Wait 30 seconds to chat the same thing."
            stop
    if player has permission "owner":
        json("@a", "&b&o%player's display name% &7❖||ttp:&b&lOwner %new line%&b%player%|| &7%message%")
    if player has permission "srstaff":
        json("@a", "&b%player's display name% &7●||cmd:/action %player%||ttp:&bSrGuardian %new line%&b%player%|| &7%message%")
    if player has permission "staff":
        json("@a", "&b%player's display name% ||cmd:/action %player%||ttp:&bGuardian %new line%&b%player%||&7● &7%message%")
    if player has permission "wanderer":
        json("@a", "&3%player's display name% ||cmd:/action %player%||ttp:&3Wanderer %new line%&3%player%||&7● &7%message%")
    if player has permission "newcomer":
        json("@a", "&7%player's display name% ||cmd:/action %player%||ttp:&7Newcomer %new line%&7%player%||&7● &7%message%")
    if player has permission "dreamer":
        json("@a", "&b☆&a⊱&9%player's display name%&a⊰&b☆ ||cmd:/action %player%||ttp: &9Dreamer %new line%&9%player%||&7● &7%message%")
    set {chatmessage.%player%} to the message
    set {chatcooldown.last.%player%} to now
Edit: Just to be a bit more clear, I'm using it in the above skript to make the "word"(player name) not only execute a command but also display a lore when you hover over it.
 
Status
Not open for further replies.