[SPIGOT-7421] spawn a villager and setProfession, Profession will be reset to NONE next tick Created: 06/Jul/23  Updated: 25/Dec/24  Resolved: 28/Jul/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Rothes Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates SPIGOT-4766 Setting Villager profession doesn't p... Resolved
Version: 1.20.1
Guidelines Read: Yes

 Description   
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


 Comments   
Comment by Rothes [ 16/Jul/23 ]

I see. Not a bug

Comment by md_5 [ 15/Jul/23 ]

Isn't this SPIGOT-4766?

You need to set a level high enough for their profession

Generated at Sat Dec 13 13:36:28 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.