Solved Clickable Player Names

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

Funtime

Active Member
Apr 24, 2017
54
0
0
22
Category: Chat / Tools and Utilites

Suggested name: Dont mind

What I want:
A simple skript that allows staff with a permission to click on a player's name in chat to open up a menu which will have the options: kick, ban and mute.

Ideas for commands: none

Ideas for permissions: staff.punish

When I'd like it by: ASAP :emoji_slight_smile:

Please note: I will not be using this for personal use, I'm new to Skript so I want to learn from people's creations. This means you do not need to make your Skript too complex, just simple enough for me to understand and expand on. I read this as something you can do with SKQuery and I immediately wanted to find out how to do it. Thanks
 
Somelike this on my way...


Need Json Api


code_language.skript:
on chat:
    cancel event
    json("@a", "%player%||cmd:/guitorantermkjhdhj %player%||>> %message%")
    
    
command /guitorantermkjhdhj <player>:
    trigger:
        if player has permission "Staff.Punish":
            open chest with 3 rows named "Punish %arg-1%" to player
            set slot 9 of player's current inventory to stick named "&6Kick %arg-1%"
            set slot 14 of player's current inventory to blaze rod named "&6Ban %arg-1%"
            set slot 18 of player's current inventory to wood named "&6Mute %arg-1%"
            
on inventory click:
    if inventory name of player's current inventory contains "Punish ":
        cancel event
        set {_n} to uncolored clicked name
        if {_n} is set:
            make player execute command "%{_n}%"