How to make an item kick a player

Started by Birb_ on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an item kick a player

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?

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
try it with /execute…
Wed, 06/16/2021 - 06:50

try it with /execute positioned ~ ~ ~ run kick @p

Use kick @p instead. The…
Thu, 07/08/2021 - 15:10

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