From what I know, you can't keep a player from getting off of their horse, but you CAN make it so that they get killed if they get off. Just be careful - putting kill player commands in loops can ruin your map very quickly, so make sure to have a backup of your map! Check if the player is on the ground, and if they are, kill them.
Use this command once to add a scoreboard objective:
/scoreboard objectives add onGround dummy
Put these commands in a loop:
/scoreboard players set @a onGround 1 {OnGround:1b}
/scoreboard players set @a onGround 0 {OnGround:0b}
/kill @a[score_onGround_min=1]
From what I know, you can't keep a player from getting off of their horse, but you CAN make it so that they get killed if they get off. Just be careful - putting kill player commands in loops can ruin your map very quickly, so make sure to have a backup of your map! Check if the player is on the ground, and if they are, kill them.
Use this command once to add a scoreboard objective:
/scoreboard objectives add onGround dummy
Put these commands in a loop:
/scoreboard players set @a onGround 1 {OnGround:1b}
/scoreboard players set @a onGround 0 {OnGround:0b}
/kill @a[score_onGround_min=1]
Thanks a lot!
Rollback Post to RevisionRollBack
GENERATION 22: The first time you see this, copy it into your signature and add 1 to the generation.
Hello,
I was wondering if there was any way to keep a player from being able to get off a horse using commands.
Thanks!
GENERATION 22: The first time you see this, copy it into your signature and add 1 to the generation.
From what I know, you can't keep a player from getting off of their horse, but you CAN make it so that they get killed if they get off. Just be careful - putting kill player commands in loops can ruin your map very quickly, so make sure to have a backup of your map! Check if the player is on the ground, and if they are, kill them.
Use this command once to add a scoreboard objective:
Put these commands in a loop:
Thanks a lot!
GENERATION 22: The first time you see this, copy it into your signature and add 1 to the generation.