Blocking JSON suggest command for %player%?

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

Adrihun

Member
Feb 1, 2017
368
6
0
Okay, So i have a JSON script.

How do I make it so if i'm the guy who wrote %message%, I Can't click on my name so it doesn't suggest "/msg %player% for me?

code_language.skript:
on chat:
    player has permission "owner.user"
    cancel event
    set {_to} to "%player%"
    set {_msg} to "test ||ttp:description ||sgt:/msg %player% || &6%player%&2: %message%||sgt:/msg %player% "
    json({_to}, {_msg})

code_language.skript:
function json(to: text, msg: text, color: boolean = true):
    set {_msg} to jsonFormat({_msg}, {_color})
    execute console command "/tellraw @a %{_msg}%"
    
    if {@debug} is true:
        set {_player} to {_to} parsed as offline player
        if {_player} is online:
            send uncolored {_msg} to {_player}
 
Last edited:
Okay, So i have a JSON script.

How do I make it so if i'm the guy who wrote %message%, I Can't click on my name so it doesn't suggest "/msg %player% for me?

code_language.skript:
on chat:
    player has permission "owner.user"
    cancel event
    set {_to} to "%player%"
    set {_msg} to "test ||ttp:description ||sgt:/msg %player% || &6%player%&2: %message%||sgt:/msg %player% "
    json({_to}, {_msg})
Set the recipients to all players that aren't the player and then send the player their own message without json
 
Status
Not open for further replies.