Hello there.
I wonder how i can cancel a "Command-Tab" event, so players can't tab a specifired command in chat.
I wonder how i can cancel a "Command-Tab" event, so players can't tab a specifired command in chat.
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!
You can always check out skUnity Downloads for downloads and any other information about Skript!
options:
blocked-commands: "/bukkit", "/version" and "/plugins"
on packet:
if event-string is "PacketPlayInTabComplete":
if "%packet field ""a""%" is {@blocked-commands}:
cancel event
options:
blocked-commands: "/bukkit", "/version" and "/plugins"
on packet play_client_tab_complete:
if string pinfo 0 of event-packet is {@blocked-commands}:
cancel event
Hey, thanks for trying to help me. - But i dont understand it, i can give a example.You can use packets for that. With Skellett it should be:
code_language.skript:options: blocked-commands: "/bukkit", "/version" and "/plugins" on packet: if event-string is "PacketPlayInTabComplete": if "%packet field ""a""%" is {@blocked-commands}: cancel event
And with MundoSK:
code_language.skript:options: blocked-commands: "/bukkit", "/version" and "/plugins" on packet play_client_tab_complete: if string pinfo 0 of event-packet is {@blocked-commands}: cancel event
You could also register the PlayerTabCompleteEvent with Skellett's custom event and then use the method expression for get the command and cancel the event.
Instead of use a command, you should use something like a function for it so it can't be executed unless it is from the GUI. Could you show me the command?Hey, thanks for trying to help me. - But i dont understand it, i can give a example.
I have a command "/EnchantUnbreakable" and then i have a GUI people, can execute the command in. But i dont want player's to "Tab" the command in chat.
Instead of use a command, you should use something like a function for it so it can't be executed unless it is from the GUI. Could you show me the command?
I meant the "/enchantunbreakable" command, not the actual GUI code. And the next time you should use codeblocks. Here is how to use them.snip
Your code here