Class EntityCollideWithEntityEvent
java.lang.Object
org.bukkit.event.Event
io.papermc.paper.event.entity.EntityCollideWithEntityEvent
- All Implemented Interfaces:
Cancellable
Fired when two entities collide with each other.
If cancelled, the entities won't get pushed away from each other.
Note that even if cancelled, the client may still run its own collision unless disabled via player teams.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionEntityCollideWithEntityEvent(@NotNull Entity entity1, @NotNull Entity entity2) -
Method Summary
Modifier and TypeMethodDescriptionReturns the entities involved in this eventstatic @NotNull HandlerListbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
EntityCollideWithEntityEvent
-
-
Method Details
-
getEntities
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-
isCancelled
public 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 interfaceCancellable- Returns:
trueif this event is cancelled
-
setCancelled
public 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 interfaceCancellable- Parameters:
cancel-trueif you wish to cancel this event
-