Class CompassTargetChangeEvent
java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.compass.CompassTargetChangeEvent
Called after a player's teammate compass changed who it points at.
A notification: the new target is already in effect. To keep a compass off someone, register
a CompassTargetFilter instead. Main thread; only fired
while a listener is registered.
- Since:
- 1.8.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhy a compass target changed.Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionCompassTargetChangeEvent(@NotNull org.bukkit.entity.Player tracker, @Nullable UUID previousTarget, @Nullable UUID newTarget, @NotNull CompassTargetChangeEvent.Cause cause) -
Method Summary
Modifier and TypeMethodDescription@NotNull CompassTargetChangeEvent.CausegetCause()Why it changed.static @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListGets the handler list for this event.Who it points at now; empty when it has no target any more.Who it pointed at before, if anyone.@NotNull org.bukkit.entity.PlayerThe player whose compass changed.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
CompassTargetChangeEvent
public CompassTargetChangeEvent(@NotNull @NotNull org.bukkit.entity.Player tracker, @Nullable @Nullable UUID previousTarget, @Nullable @Nullable UUID newTarget, @NotNull @NotNull CompassTargetChangeEvent.Cause cause)
-
-
Method Details
-
getTracker
@NotNull public @NotNull org.bukkit.entity.Player getTracker()The player whose compass changed. -
getPreviousTarget
Who it pointed at before, if anyone. -
getNewTarget
Who it points at now; empty when it has no target any more. -
getCause
Why it changed. -
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Description copied from class:ZentrixEventGets the handler list for this event.- Overrides:
getHandlersin classZentrixEvent- Returns:
- The handler list
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
-