public interface ThrownPotion extends Projectile
Entity.Spigot
Modifier and Type | Method and Description |
---|---|
Collection<PotionEffect> |
getEffects()
Returns the effects that are applied by this potion.
|
ItemStack |
getItem()
Returns a copy of the ItemStack for this thrown potion.
|
void |
setItem(ItemStack item)
Set the ItemStack for this thrown potion.
|
doesBounce, getShooter, setBounce, setShooter
addPassenger, addScoreboardTag, eject, fromMobSpawner, getChunk, getEntityId, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInsideVehicle, isInvulnerable, isOnGround, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPortalCooldown, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport
getMetadata, hasMetadata, removeMetadata, setMetadata
getName, sendMessage, sendMessage, sendMessage, sendMessage
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
isOp, setOp
getCustomName, setCustomName
Collection<PotionEffect> getEffects()
ItemStack getItem()
Altering this copy will not alter the thrown potion directly. If you want
to alter the thrown potion, you must use the setItemStack
method.
void setItem(ItemStack item)
The ItemStack must be of type Material.SPLASH_POTION
or Material.LINGERING_POTION
, otherwise an exception
is thrown.
item
- New ItemStackCopyright © 2021. All rights reserved.