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