Scoreboard.villager constructor

Scoreboard.villager(
  1. String name, {
  2. TextComponent? display,
  3. bool addIntoLoad = true,
  4. bool removeOld = false,
})

The Scoreboard.click constructor adds a carrot on a stick click event objective

Implementation

factory Scoreboard.villager(
  String name, {
  TextComponent? display,
  bool addIntoLoad = true,
  bool removeOld = false,
}) =>
    Scoreboard(
      name,
      type: 'minecraft.custom:minecraft.talked_to_villager',
      display: display,
      addIntoLoad: addIntoLoad,
    );