Class PlayerTrackEntityEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.PlayerTrackEntityEvent
- All Implemented Interfaces:
Cancellable
Is called when a
Player tracks an Entity.
If cancelled entity is not shown to the player and interaction in both directions is not possible.
Adding or removing entities from the world at the point in time this event is called is completely unsupported and should be avoided. Teleporting entities in the world at the point in time this event is called yields an undefined tracker behavior and should be avoided.
- Since:
- 1.19.2
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class PlayerEvent
player -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the entity that will be trackedstatic HandlerListbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class PlayerEvent
getPlayerMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerTrackEntityEvent
-
-
Method Details
-
getEntity
Gets the entity that will be tracked- Returns:
- the entity tracked
- Since:
- 1.19.2
-
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- Since:
- 1.20.1
-
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- Since:
- 1.20.1
-
getHandlerList
- Since:
- 1.19.2
-
getHandlers
- Specified by:
getHandlersin classEvent- Since:
- 1.19.2
-