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