Contents
Class UseEntityEvent.Pre
java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.server.core.event.events.ecs.UseEntityEvent
com.hypixel.hytale.server.core.event.events.ecs.UseEntityEvent.Pre
- All Implemented Interfaces:
ICancellableEcsEvent
- Enclosing class:
UseEntityEvent
An event that is called before an entity is used.
If cancelled, the interaction will return as failed.
-
Nested Class Summary
Nested classes/interfaces inherited from class UseEntityEvent
UseEntityEvent.Post, UseEntityEvent.Pre -
Constructor Summary
ConstructorsConstructorDescriptionPre(InteractionType interactionType, InteractionContext context, Ref<EntityStore> targetEntity) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this event has been cancelled.voidsetCancelled(boolean cancelled) Changes whether this event has been cancelled or not.Methods inherited from class UseEntityEvent
getContext, getInteractionType, getTargetEntity
-
Constructor Details
-
Pre
public Pre(@Nonnull InteractionType interactionType, @Nonnull InteractionContext context, @Nonnull Ref<EntityStore> targetEntity)
-
-
Method Details
-
isCancelled
public boolean isCancelled()Description copied from interface:ICancellableEcsEventReturns whether this event has been cancelled.- Specified by:
isCancelledin interfaceICancellableEcsEvent- Returns:
trueif the event is cancelled,falseotherwise.
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:ICancellableEcsEventChanges whether this event has been cancelled or not.- Specified by:
setCancelledin interfaceICancellableEcsEvent- Parameters:
cancelled- Whether the event should be cancelled.
-