Started by
Birb_
on
Topic category: Help with Minecraft modding (Java Edition)
I am creating a joke mod with a variety of useless items, among them is a "potion of kicking" which should kick the player upon consumption, but it doesn't. I have it set to execute the command /kick @s when used but it does nothing. Using the command in the console however, works just fine. Is there any way I can get a potion to kick the player that uses it?
try it with /execute positioned ~ ~ ~ run kick @p
Use kick @p instead. The reason @s doesn't work is because @s targets the player executing the command, but in this case it is technically the potion which is executing the command and not the player (and obviously the game cannot kick a potion).