2

I want to have explosive consequences for breaking rules, if you place a bed primed TNT appears at your feet, if you try to sleep in a bed same, and same if you try to kill another player, so please just give me how to do one of those and I can modify it for the rest.

1 Answer 1

4

This answer will show you how to summon the TNT when you kill another player.

Begin by creating the objective playerkill to detect when a player kills another player:

/scoreboard objectives add playerkill playerKillCount

Next, create a repeat command block (set to 'always active') and a chain command block, containing these commands:

/execute @a[score_playerkill_min=1] ~ ~-1 ~ summon PrimedTnt ~ ~ ~ {Fuse:0}
/scoreboard players set @a[score_playerkill_min=1] playerkill 0

These will check every tick whether or not a player has killed another player, and summons a primed TNT below their feet if they have. Then it resets the player killer's score to zero, so the player isn't constantly killed.

Demonstration: (note I have manually set my score to 1, since I do not have another player to murder test with)

When I 'kill' another player, I instantly explode

1
  • and off of that I know how to do the other 2
    – DeJeL
    Jul 31, 2016 at 7:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .