[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: |
|
||||||||
| 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 You need to set a level high enough for their profession |