Is there a way to kill all players not in a minecart in Minecraft?

Is there a way to kill all players not in a minecart in Minecraft? - Man With Luggage on Road during Sunset

I am building a musical chairs Minecraft map, and I was wondering if there is a way to kill all players who aren't riding in a minecart?



Best Answer

The closest thing I can think of is setting up your minecarts like this (with the rails):

The Minecart Setup

Then enter /execute positioned as @a if block ~ ~-1 ~ grass_block run kill @p Replace grass_block with your floor material (assuming that the material under the minecarts are the same).

When a player is in a minecart, the block under them will be the rail instead of the floor block (in this case, grass_block). Those who are standing on the floor (the block under them is the floor block) will be killed.

However, there is only one problem. Players can survive by jumping. One solution is to make the whole room 2 blocks high, or to put barrier blocks above the players' heads.




Pictures about "Is there a way to kill all players not in a minecart in Minecraft?"

Is there a way to kill all players not in a minecart in Minecraft? - Big all terrain vehicle on road out of city
Is there a way to kill all players not in a minecart in Minecraft? - A Person Holding King of Hearts Card
Is there a way to kill all players not in a minecart in Minecraft? - A Card Dealer Holding a Card in Front of the Players



How do you kill every player in Minecraft?

Kill Command In all Minecraft editions, the command for killing everything in the world is \u201c /kill <target> \u201d. Typing \u201c /kill \u201d any target in the console will destroy pretty much everything that can be removed, including the player.

How many minecarts does it take to kill a player?

Killing mobs in Minecraft using entity cramming To do this, players need to trap at least 24 mobs or have a chamber that uses minecarts to maximize the entity capacity per block so that when a mob enters the chamber, it starts taking suffocation damage and dies.

How do you kill every player?

Using the Command to Kill Everything Except the Player You can follow the following steps to do so: Open chatbox and enter the following command: /kill @e[type=! player] and hit Enter.

Can you place minecart without rails?

Place a line of 2 blocks. Put powered rail and torch next to it. Put minecarys on powered rail and they should shoot off. Just push the minecarts around to the right spot after that.



Kill Command Explained




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Pixabay, Brett Sayles, Anna Shvets, Anna Shvets