Package org.bukkit.entity

# Interface ThrownPotion

All Superinterfaces:
  `Audience`, `CommandSender`, `Entity`, `HoverEventSource<HoverEvent.ShowEntity>`, `Metadatable`, `Nameable`, `Permissible`, `PersistentDataHolder`, `Pointered`, `Projectile`, `ServerOperator`, `Sound.Emitter`

All Known Subinterfaces:
  `LingeringPotion`, `SplashPotion`

public interface ThrownPotion extends Projectile
Represents a thrown potion bottle

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.bukkit.entity.Entity

`Entity.Spigot`

## Method Summary

Modifier and Type
Method
Description
`@NotNull Collection<PotionEffect>`
`getEffects()`
Returns the effects that are applied by this potion.
`@NotNull ItemStack`
`getItem()`
Returns a copy of the ItemStack for this thrown potion.
`void`
`setItem(@NotNull ItemStack item)`
Set the ItemStack for this thrown potion.

### Methods inherited from interface net.kyori.adventure.audience.Audience

`clearTitle, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSound`

### Methods inherited from interface org.bukkit.command.CommandSender

`getName, name, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage`

### Methods inherited from interface org.bukkit.entity.Entity

`addPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getTrackedPlayers, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInBubbleColumn, isInLava, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisualFire, spawnAt, spawnAt, spigot, teamDisplayName, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync`

### Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource

`asHoverEvent`

### Methods inherited from interface org.bukkit.metadata.Metadatable

`getMetadata, hasMetadata, removeMetadata, setMetadata`

### Methods inherited from interface org.bukkit.Nameable

`customName, customName, getCustomName, setCustomName`

### Methods inherited from interface org.bukkit.permissions.Permissible

`addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, permissionValue, permissionValue, recalculatePermissions, removeAttachment`

### Methods inherited from interface org.bukkit.persistence.PersistentDataHolder

`getPersistentDataContainer`

### Methods inherited from interface net.kyori.adventure.pointer.Pointered

`get, getOrDefault, getOrDefaultFrom, pointers`

### Methods inherited from interface org.bukkit.entity.Projectile

`doesBounce, getShooter, setBounce, setShooter`

### Methods inherited from interface org.bukkit.permissions.ServerOperator

`isOp, setOp`

## Method Details

### getEffects

@NotNull @NotNull Collection<PotionEffect> getEffects()
Returns the effects that are applied by this potion.

Returns:
  The potion effects

### getItem

@NotNull @NotNull ItemStack getItem()
Returns a copy of the ItemStack for this thrown potion.

Altering this copy will not alter the thrown potion directly. If you want to alter the thrown potion, you must use the `setItemStack` method.

Returns:
  A copy of the ItemStack for this thrown potion.

### setItem

void setItem(@NotNull @NotNull ItemStack item)
Set the ItemStack for this thrown potion.

The ItemStack must be of type `Material.SPLASH_POTION` or `Material.LINGERING_POTION`, otherwise an exception is thrown.

Parameters:
  `item` - New ItemStack