--- a/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java
+++ b/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java
@@ -12,33 +12,48 @@
 import net.minecraft.world.entity.npc.Villager;
 import net.minecraft.world.entity.npc.VillagerProfession;
 
+// CraftBukkit start
+import org.bukkit.craftbukkit.v1_19_R1.entity.CraftVillager;
+import org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory;
+import org.bukkit.event.entity.VillagerCareerChangeEvent;
+// CraftBukkit end
+
 public class AssignProfessionFromJobSite extends Behavior<Villager> {
+
     public AssignProfessionFromJobSite() {
         super(ImmutableMap.of(MemoryModuleType.POTENTIAL_JOB_SITE, MemoryStatus.VALUE_PRESENT));
     }
 
-    @Override
     protected boolean checkExtraStartConditions(ServerLevel world, Villager entity) {
-        BlockPos blockPos = entity.getBrain().getMemory(MemoryModuleType.POTENTIAL_JOB_SITE).get().pos();
-        return blockPos.closerToCenterThan(entity.position(), 2.0D) || entity.assignProfessionWhenSpawned();
+        BlockPos blockposition = ((GlobalPos) entity.getBrain().getMemory(MemoryModuleType.POTENTIAL_JOB_SITE).get()).pos();
+
+        return blockposition.closerToCenterThan(entity.position(), 2.0D) || entity.assignProfessionWhenSpawned();
     }
 
-    @Override
     protected void start(ServerLevel world, Villager entity, long time) {
-        GlobalPos globalPos = entity.getBrain().getMemory(MemoryModuleType.POTENTIAL_JOB_SITE).get();
+        GlobalPos globalpos = (GlobalPos) entity.getBrain().getMemory(MemoryModuleType.POTENTIAL_JOB_SITE).get();
+
         entity.getBrain().eraseMemory(MemoryModuleType.POTENTIAL_JOB_SITE);
-        entity.getBrain().setMemory(MemoryModuleType.JOB_SITE, globalPos);
-        world.broadcastEntityEvent(entity, (byte)14);
+        entity.getBrain().setMemory(MemoryModuleType.JOB_SITE, globalpos); // CraftBukkit - decompile error
+        world.broadcastEntityEvent(entity, (byte) 14);
         if (entity.getVillagerData().getProfession() == VillagerProfession.NONE) {
-            MinecraftServer minecraftServer = world.getServer();
-            Optional.ofNullable(minecraftServer.getLevel(globalPos.dimension())).flatMap((worldx) -> {
-                return worldx.getPoiManager().getType(globalPos.pos());
+            MinecraftServer minecraftserver = world.getServer();
+
+            Optional.ofNullable(minecraftserver.getLevel(globalpos.dimension())).flatMap((worldserver1) -> {
+                return worldserver1.getPoiManager().getType(globalpos.pos());
             }).flatMap((holder) -> {
-                return Registry.VILLAGER_PROFESSION.stream().filter((profession) -> {
-                    return profession.heldJobSite().test(holder);
+                return Registry.VILLAGER_PROFESSION.stream().filter((villagerprofession) -> {
+                    return villagerprofession.heldJobSite().test(holder);
                 }).findFirst();
-            }).ifPresent((profession) -> {
-                entity.setVillagerData(entity.getVillagerData().setProfession(profession));
+            }).ifPresent((villagerprofession) -> {
+                // CraftBukkit start - Fire VillagerCareerChangeEvent where Villager gets employed
+                VillagerCareerChangeEvent event = CraftEventFactory.callVillagerCareerChangeEvent(entity, CraftVillager.nmsToBukkitProfession(villagerprofession), VillagerCareerChangeEvent.ChangeReason.EMPLOYED);
+                if (event.isCancelled()) {
+                    return;
+                }
+
+                entity.setVillagerData(entity.getVillagerData().setProfession(CraftVillager.bukkitToNmsProfession(event.getProfession())));
+                // CraftBukkit end
                 entity.refreshBrain(world);
             });
         }
