Package io.papermc.paper.event.entity
Class PufferFishStateChangeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
io.papermc.paper.event.entity.PufferFishStateChangeEvent
- All Implemented Interfaces:
- Cancellable
Called just before a 
PufferFish inflates or deflates.- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns the Entity involved in this eventstatic @NotNull HandlerListintGet the new puff state of thePufferFish.booleanGets the cancellation state of this event.booleanGet if thePufferFishis going to deflate.booleanGet if thePufferFishis going to inflate.voidsetCancelled(boolean cancel) Set whether or not to cancel thePufferFish(in/de)flating.Methods inherited from class org.bukkit.event.entity.EntityEventgetEntityTypeMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PufferFishStateChangeEvent
 
- 
- 
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
 
- 
getNewPuffStatepublic int getNewPuffState()Get the new puff state of thePufferFish.This is what the PufferFish's new puff state will be after this event if it isn't cancelled.
 Refer toPufferFish.getPuffState()to get the current puff state.- Returns:
- The new puff state, 0 being not inflated, 1 being slightly inflated and 2 being fully inflated
 
- 
isInflatingpublic boolean isInflating()Get if thePufferFishis going to inflate.- Returns:
- If its going to inflate
 
- 
isDeflatingpublic boolean isDeflating()Get if thePufferFishis going to deflate.- Returns:
- If its going to deflate
 
- 
setCancelledpublic void setCancelled(boolean cancel) Set whether or not to cancel thePufferFish(in/de)flating.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel the (in/de)flation
 
- 
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
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-