ThrownPotion

A thrown potion.

Functions

Link copied to clipboard
abstract fun addPassenger(entity: Entity)

Adds the given entity as a passenger of this entity.

Link copied to clipboard
@NotNull
open fun asHoverEvent(): @NotNull HoverEvent<HoverEvent.ShowEntity>
@NotNull
abstract fun asHoverEvent(@NotNull op: @NotNull UnaryOperator<HoverEvent.ShowEntity>): @NotNull HoverEvent<HoverEvent.ShowEntity>
Link copied to clipboard
abstract fun asItem(): ItemStack

Converts this object to its item stack representation.

Link copied to clipboard

Converts this subject to its equivalent Adventure permission checker.

Link copied to clipboard
open fun clearTitle()
Link copied to clipboard
abstract fun damage(source: DamageSource, damage: Float): Boolean

Damages this entity with the given source.

Link copied to clipboard
open fun deleteMessage(@NotNull signedMessage: @NotNull SignedMessage)
open fun deleteMessage(signature: @NotNull SignedMessage.Signature)
Link copied to clipboard
abstract fun ejectPassengers()

Ejects all passengers from this entity.

Link copied to clipboard
abstract fun ejectVehicle()

Ejects this entity from it's vehicle.

Link copied to clipboard
@NotNull
open fun filterAudience(@NotNull filter: @NotNull Predicate<in Audience>): @NotNull Audience
Link copied to clipboard
open fun forEachAudience(@NotNull action: @NotNull Consumer<in Audience>)
Link copied to clipboard
@NotNull
open operator fun <T : Any> get(@NotNull pointer: @NotNull Pointer<T>): @NotNull Optional<T>
Link copied to clipboard
@Contract(value = "_, null -> _; _, !null -> !null")
@Nullable
open fun <T : Any> getOrDefault(@NotNull pointer: @NotNull Pointer<T>, @Nullable defaultValue: @Nullable T?): @Nullable T?
Link copied to clipboard
open fun <T : Any> getOrDefaultFrom(@NotNull pointer: @NotNull Pointer<T>, @NotNull defaultValue: @NotNull Supplier<out T>): @UnknownNullability T
Link copied to clipboard
abstract fun getPermissionValue(permission: String): TriState

Gets the value for the given permission.

Link copied to clipboard
abstract fun hasBeenShot(): Boolean

If this projectile has been shot.

Link copied to clipboard
abstract fun hasLeftOwner(): Boolean

If this projectile has left its owner's hitbox.

Link copied to clipboard
open fun hasPermission(permission: String): Boolean

Checks if this subject has the given permission.

Link copied to clipboard
open fun hideBossBar(@NotNull bar: @NotNull BossBar)
Link copied to clipboard
@NotNull
abstract fun identity(): @NotNull Identity
Link copied to clipboard
abstract fun isInLava(): Boolean

If this entity is currently touching lava.

Link copied to clipboard
abstract fun isInWater(): Boolean

If this entity is currently touching water.

Link copied to clipboard
abstract fun isPassenger(): Boolean

If this entity is a passenger of another entity.

Link copied to clipboard
abstract fun isUnderwater(): Boolean

If this entity is currently fully submerged under water, meaning its entire hitbox must be under water.

Link copied to clipboard
abstract fun isVehicle(): Boolean

If this entity is a vehicle for another entity.

Link copied to clipboard
open fun openBook(@NotNull book: @NotNull Book)
open fun openBook(book: @NotNull Book.Builder)
Link copied to clipboard
open fun playSound(@NotNull sound: @NotNull Sound)
open fun playSound(@NotNull sound: @NotNull Sound, emitter: @NotNull Sound.Emitter)
open fun playSound(@NotNull sound: @NotNull Sound, x: Double, y: Double, z: Double)
Link copied to clipboard
@NotNull
open fun pointers(): @NotNull Pointers
Link copied to clipboard
abstract fun remove()

Removes this entity from the world it is currently in.

Link copied to clipboard
abstract fun removePassenger(entity: Entity)

Removes the given entity as a passenger of this entity.

Link copied to clipboard
open fun resetTitle()
Link copied to clipboard
open fun sendActionBar(@NotNull message: @NotNull Component)
open fun sendActionBar(@NotNull message: @NotNull ComponentLike)
Link copied to clipboard
open fun sendMessage(@NotNull message: @NotNull Component)
open fun sendMessage(@NotNull message: @NotNull ComponentLike)
open fun sendMessage(@NotNull signedMessage: @NotNull SignedMessage, boundChatType: @NotNull ChatType.Bound)
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull Component)
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull ComponentLike)
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull Component)
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull ComponentLike)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
open fun sendMessage(@NotNull message: @NotNull Component, boundChatType: @NotNull ChatType.Bound)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
open fun sendMessage(@NotNull message: @NotNull ComponentLike, boundChatType: @NotNull ChatType.Bound)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
Link copied to clipboard
open fun sendPlayerListFooter(@NotNull footer: @NotNull Component)
open fun sendPlayerListFooter(@NotNull footer: @NotNull ComponentLike)
Link copied to clipboard
open fun sendPlayerListHeader(@NotNull header: @NotNull Component)
open fun sendPlayerListHeader(@NotNull header: @NotNull ComponentLike)
Link copied to clipboard
open fun sendPlayerListHeaderAndFooter(@NotNull header: @NotNull Component, @NotNull footer: @NotNull Component)
open fun sendPlayerListHeaderAndFooter(@NotNull header: @NotNull ComponentLike, @NotNull footer: @NotNull ComponentLike)
Link copied to clipboard
open fun <T : Any> sendTitlePart(@NotNull part: @NotNull TitlePart<T>, @NotNull value: @NotNull T)
Link copied to clipboard
open fun showBossBar(@NotNull bar: @NotNull BossBar)
Link copied to clipboard
open fun showTitle(@NotNull title: @NotNull Title)
Link copied to clipboard
@NotNull
abstract fun soundSource(): @NotNull Sound.Source
Link copied to clipboard
open fun stopSound(@NotNull sound: @NotNull Sound)
open fun stopSound(@NotNull stop: @NotNull SoundStop)
Link copied to clipboard
open fun teleport(entity: Entity)

Teleports this entity to the given other entity.

abstract fun teleport(position: Position)

Teleports this entity to the given position.

Properties

Link copied to clipboard
abstract val airSupply: Int

How much air this entity has, in ticks.

Link copied to clipboard
abstract val boundingBox: BoundingBox

The current bounding box of this entity. This is used to determine the area in which an entity can be interacted with, also known as a hitbox.

Link copied to clipboard
abstract var customName: Component?

The custom name of the entity. May be null if the custom name has not been set.

Link copied to clipboard
abstract val displayName: Component

The display name of this entity in their current team, if they are in a team.

Link copied to clipboard
abstract val fallDistance: Float

The distance this entity has fallen.

Link copied to clipboard
abstract val frozenTicks: Int

The amount of ticks this entity has been freezing for.

Link copied to clipboard
@get:JvmName(name = "hasGravity")
abstract var hasGravity: Boolean

If this entity is affected by gravity.

Link copied to clipboard
abstract val id: Int

The ID of this entity.

Link copied to clipboard

If the current custom name is visible or not.

Link copied to clipboard
abstract var isGlowing: Boolean

If this entity has a glowing outline.

Link copied to clipboard
abstract var isInvisible: Boolean

If this entity is invisible.

Link copied to clipboard
abstract var isInvulnerable: Boolean

If this entity should not take damage from any source.

Link copied to clipboard
abstract var isOnFire: Boolean

If this entity is currently on fire.

Link copied to clipboard
abstract val isOnGround: Boolean

If this entity is on terra firma.

Link copied to clipboard
abstract var isSilent: Boolean

If this entity is silenced, meaning it does not produce any sounds.

Link copied to clipboard
abstract var isSneaking: Boolean

If this entity is sneaking.

Link copied to clipboard
abstract var isSprinting: Boolean

If this entity is sprinting.

Link copied to clipboard
abstract var isSwimming: Boolean

If this entity is swimming.

Link copied to clipboard
abstract val name: String

The name of the sender.

Link copied to clipboard
abstract val owner: Entity?

The owner of this projectile, or null if this projectile does not have an owner yet.

Link copied to clipboard
abstract val passengers: List<Entity>

The passengers this entity currently has.

Link copied to clipboard
abstract val position: Position

The current position of this entity.

Link copied to clipboard
abstract val remainingFireTicks: Int

This value can mean one of two things, depending on if the value is positive or negative.

Link copied to clipboard
abstract val scheduler: Scheduler

The scheduler for this entity.

Link copied to clipboard
abstract val server: Server

The server that the sender is on.

Link copied to clipboard
abstract val team: Team?

If the member is currently part of a team, the team the member is part of.

Link copied to clipboard

How this member will be represented in a team.

Link copied to clipboard
abstract val ticksExisted: Int

The amount of ticks this entity has existed for.

Link copied to clipboard
abstract val type: EntityType<Entity>

The type of this entity.

Link copied to clipboard
abstract val uuid: UUID

The UUID of this entity.

Link copied to clipboard
abstract val vehicle: Entity?

The entity that this entity is a passenger of.

Link copied to clipboard
abstract var velocity: Vec3d

The current delta X, Y, and Z values of this entity, in metres per tick.

Link copied to clipboard
abstract val world: World

The world this entity is currently in.