How to teleport after you've killed a villager?



  • How to teleport after you kill a villager?

    I am now making a map called 'The Lost Friends', and there is a challenge called 'Kill the Cute Villager to Win' but I want to teleport the player after he kills him.



  • You can track when a player kills a villager using the stat.killEntity.Villager objective-type:

    /scoreboard objectives add KilledVillager stat.killEntity.Villager
    

    And you'd run the following on a clock in order to teleport the player and then reset their score so that they aren't constantly teleported:

    /tp @a[score_KilledVillager_min=1] X Y Z
    /scoreboard players reset @a[score_KilledVillager_min=1] KilledVillager
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2