Arqade Asked on August 20, 2021
How do I use @p in tellraw without a command block? This is what the current command looks like, and I want it to kick whoever clicks it.
/tellraw @a ["",{"text":"Click me!","clickEvent":{"action":"run_command","value":"/kick @p You got trolled!"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click me!"}]}}}]
Your command can be run by typing it into chat. No need for a command block. Your command will work as is, with the @p target selector.
I recommend you use @s target selector as it will select the player who executed the command, which is the player who clicked the tellraw text.
Note: The command is executed by the player at the permission level of the player. If your players do not have permission to use the kick command, your command will not work. There is a work around involving the trigger command but it adds complication to the system which will no longer be a type it in chat solution.
Answered by IronAnvil on August 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP