Class FlagApplyEvent
java.lang.Object
org.bukkit.event.Event
studio.magemonkey.fabled.api.event.FlagApplyEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class FlagApplyEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Event called when a flag is applied to an entity
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionFlagApplyEvent(org.bukkit.entity.LivingEntity entity, String flag, int ticks) Constructor -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.LivingEntityRetrieves the entity that the flag is being applied togetFlag()Retrieves the flag that is to be appliedstatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListintgetTicks()Retrieves the number of ticks the flag is to be applied forbooleanChecks whether the event is cancelledvoidsetCancelled(boolean cancelled) Sets whether the event is cancelledMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
FlagApplyEvent
Constructor- Parameters:
entity- the entity the flag was onflag- the flag that is to be appliedticks- the ticks the flag is to be applied for
-
-
Method Details
-
getEntity
public org.bukkit.entity.LivingEntity getEntity()Retrieves the entity that the flag is being applied to- Returns:
- the entity having the flag applied to
-
getFlag
Retrieves the flag that is to be applied- Returns:
- the flag being applied
-
getTicks
public int getTicks()Retrieves the number of ticks the flag is to be applied for- Returns:
- the number of ticks
-
isCancelled
public boolean isCancelled()Checks whether the event is cancelled- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
- true if cancelled, false otherwise
-
setCancelled
public void setCancelled(boolean cancelled) Sets whether the event is cancelled- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancelled- true if cancelled, false otherwise
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event- Returns:
- gets the handlers for the event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()- Returns:
- gets the handlers for the event
-