Cancellablepublic class EntityBreedEvent extends EntityEvent implements Cancellable
Event.Resultentity| Constructor | Description |
|---|---|
EntityBreedEvent(@NotNull LivingEntity child,
@NotNull LivingEntity mother,
@NotNull LivingEntity father,
@Nullable LivingEntity breeder,
@Nullable ItemStack bredWith,
int experience) |
| Modifier and Type | Method | Description |
|---|---|---|
@Nullable ItemStack |
getBredWith() |
The ItemStack that was used to initiate breeding, if present.
|
@Nullable LivingEntity |
getBreeder() |
Gets the Entity responsible for breeding.
|
@NotNull LivingEntity |
getEntity() |
Returns the Entity involved in this event
|
int |
getExperience() |
Get the amount of experience granted by breeding.
|
@NotNull LivingEntity |
getFather() |
Gets the other parent of the newly born entity.
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull LivingEntity |
getMother() |
Gets the parent creating this entity.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
void |
setExperience(int experience) |
Set the amount of experience granted by breeding.
|
getEntityTypegetEventName, isAsynchronouspublic EntityBreedEvent(@NotNull
@NotNull LivingEntity child,
@NotNull
@NotNull LivingEntity mother,
@NotNull
@NotNull LivingEntity father,
@Nullable
@Nullable LivingEntity breeder,
@Nullable
@Nullable ItemStack bredWith,
int experience)
@NotNull public @NotNull LivingEntity getEntity()
EntityEventgetEntity in class EntityEvent@NotNull public @NotNull LivingEntity getMother()
@NotNull public @NotNull LivingEntity getFather()
@Nullable public @Nullable LivingEntity getBreeder()
@Nullable public @Nullable ItemStack getBredWith()
public int getExperience()
public void setExperience(int experience)
experience - experience amountpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(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 © 2020. All rights reserved.