Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7421

spawn a villager and setProfession, Profession will be reset to NONE next tick

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • None
    • None
    • 1.20.1
    • Yes

      Villager villager = loc.getWorld().spawn(Villager.class)
      villager.setProfession(Profession.LIBRARIAN);
      
      System.out.println(villager.getProfession());  // LIBRARIAN
      Bukkit.getScheduler().runTaskLater(plugin, () -> System.out.println(villager.getProfession()), 1);  // NONE
      

            Unassigned Unassigned
            Rothes Rothes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: