0

Well, I was playing on a Creative Plots server today, and I noticed this particular book. When you held it, it killed you. I know there must have been some hacks involved, but how was it done? I think NBT was involved, so is there a tag that would make this possible?

1

I would add a scoreboard dummy variable for anybody holding the book, like so;

/scoreboard objectives add holding.killbook dummy

Next, add a scoreboard variable for deaths, to reset the previous variable;

/scoreboard objectives add deaths deathCount

Then, put these three commands (in this order) on a repeating command string;

/scoreboard players set @a holding.killbook 1 {SelectedItem:{id:id,tag:{put any other NBT tags in here}}}

/kill @a[score_holding.killbook_min=1]

/scoreboard players set @a[score_deaths_min=1] holding.killbook 0

  • How can you set holding.killbook if the player is dead? Wouldn't holding.killbook always be set to 1 once a player holds the killbook? (I'm assuming all three command blocks operate in the same tick) – Ted Brownlow Dec 3 '16 at 18:03
  • A variable can be set to a player regardless of whether they are dead or not – Allen Short Dec 7 '16 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.