Package org.bukkit.event.entity
Class EntityBreedEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityBreedEvent
- All Implemented Interfaces:
- Cancellable
Called when one Entity breeds with another Entity.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionEntityBreedEvent(LivingEntity child, LivingEntity mother, LivingEntity father, LivingEntity breeder, ItemStack bredWith, int experience) 
- 
Method SummaryModifier and TypeMethodDescriptionThe ItemStack that was used to initiate breeding, if present.Gets the Entity responsible for breeding.Returns the Entity involved in this eventintGet the amount of experience granted by breeding.Gets the other parent of the newly born entity.static HandlerListGets the parent creating this entity.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetExperience(int experience) Set the amount of experience granted by breeding.Methods inherited from class org.bukkit.event.entity.EntityEventgetEntityTypeMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
EntityBreedEventpublic EntityBreedEvent(@NotNull LivingEntity child, @NotNull LivingEntity mother, @NotNull LivingEntity father, @Nullable LivingEntity breeder, @Nullable ItemStack bredWith, int experience) 
 
- 
- 
Method Details- 
getEntityDescription copied from class:EntityEventReturns the Entity involved in this event- Overrides:
- getEntityin class- EntityEvent
- Returns:
- Entity who is involved in this event
 
- 
getMotherGets the parent creating this entity.- Returns:
- The "birth" parent
 
- 
getFatherGets the other parent of the newly born entity.- Returns:
- the other parent
 
- 
getBreederGets the Entity responsible for breeding. Breeder is null for spontaneous conception.- Returns:
- The Entity who initiated breeding.
 
- 
getBredWithThe ItemStack that was used to initiate breeding, if present.- Returns:
- ItemStack used to initiate breeding.
 
- 
getExperiencepublic int getExperience()Get the amount of experience granted by breeding.- Returns:
- experience amount
 
- 
setExperiencepublic void setExperience(int experience) Set the amount of experience granted by breeding.- Parameters:
- experience- experience amount
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-