public class VillagerCareerChangeEvent extends EntityEvent implements Cancellable
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
VillagerCareerChangeEvent.ChangeReason
Reasons for the villager's profession changing. 
 | 
Event.Resultentity| Constructor and Description | 
|---|
VillagerCareerChangeEvent(@NotNull Villager what,
                         @NotNull Villager.Profession profession,
                         @NotNull VillagerCareerChangeEvent.ChangeReason reason)  | 
| Modifier and Type | Method and Description | 
|---|---|
@NotNull Villager | 
getEntity()
Returns the Entity involved in this event 
 | 
static @NotNull HandlerList | 
getHandlerList()  | 
@NotNull HandlerList | 
getHandlers()  | 
@NotNull Villager.Profession | 
getProfession()
Gets the future profession of the villager. 
 | 
@NotNull VillagerCareerChangeEvent.ChangeReason | 
getReason()
Gets the reason for why the villager's career is changing. 
 | 
boolean | 
isCancelled()
Gets the cancellation state of this event. 
 | 
void | 
setCancelled(@NotNull boolean cancel)
Sets the cancellation state of this event. 
 | 
void | 
setProfession(@NotNull Villager.Profession profession)
Sets the profession the villager will become from this event. 
 | 
getEntityTypecallEvent, getEventName, isAsynchronouspublic VillagerCareerChangeEvent(@NotNull @NotNull Villager what, @NotNull @NotNull Villager.Profession profession, @NotNull @NotNull VillagerCareerChangeEvent.ChangeReason reason)
@NotNull public @NotNull Villager getEntity()
EntityEventgetEntity in class EntityEvent@NotNull public @NotNull Villager.Profession getProfession()
public void setProfession(@NotNull @NotNull Villager.Profession profession)
profession - new profession@NotNull public @NotNull VillagerCareerChangeEvent.ChangeReason getReason()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(@NotNull @NotNull boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2022. All rights reserved.