Interface Target
- All Known Implementing Classes:
EntityTarget,LocationTarget
Represents a target location or entity within a skill execution context.
-
Method Summary
Modifier and TypeMethodDescription@Nullable org.bukkit.entity.EntityGets this target as a Bukkit Entity, if applicable.@NotNull org.bukkit.LocationGets the location of this target.default booleanisEntity()Checks if this target is an entity.
-
Method Details
-
getLocation
@NotNull @NotNull org.bukkit.Location getLocation()Gets the location of this target.- Returns:
- the target location
-
getAsEntity
@Nullable @Nullable org.bukkit.entity.Entity getAsEntity()Gets this target as a Bukkit Entity, if applicable.- Returns:
- the target entity, or null if it represents a location
-
isEntity
default boolean isEntity()Checks if this target is an entity.- Returns:
- true if the target is an entity, false otherwise
-