Arrow
, CommandSender
, Entity
, Metadatable
, Nameable
, Permissible
, Projectile
, ServerOperator
public interface TippedArrow extends Arrow
Arrow.PickupRule, Arrow.PickupStatus, Arrow.Spigot
Modifier and Type | Method | Description |
---|---|---|
boolean |
addCustomEffect(PotionEffect effect,
boolean overwrite) |
Adds a custom potion effect to this arrow.
|
void |
clearCustomEffects() |
Removes all custom potion effects from this arrow.
|
PotionData |
getBasePotionData() |
Returns the potion data about the base potion
|
Color |
getColor() |
Gets the color of this arrow.
|
List<PotionEffect> |
getCustomEffects() |
Gets an immutable list containing all custom potion effects applied to
this arrow.
|
boolean |
hasCustomEffect(PotionEffectType type) |
Checks for a specific custom potion effect type on this arrow.
|
boolean |
hasCustomEffects() |
Checks for the presence of custom potion effects.
|
boolean |
removeCustomEffect(PotionEffectType type) |
Removes a custom potion effect from this arrow.
|
void |
setBasePotionData(PotionData data) |
Sets the underlying potion data
|
void |
setColor(Color color) |
Sets the color of this arrow.
|
getAttachedBlock, getDamage, getKnockbackStrength, getPickupRule, getPickupStatus, isCritical, isInBlock, setCritical, setDamage, setKnockbackStrength, setPickupRule, setPickupStatus, spigot
getName, sendMessage, sendMessage, sendMessage, sendMessage
addPassenger, addScoreboardTag, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, 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, isPersistent, isSilent, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync
getMetadata, hasMetadata, removeMetadata, setMetadata
getCustomName, setCustomName
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
doesBounce, getShooter, setBounce, setShooter
isOp, setOp
void setBasePotionData(@NotNull PotionData data)
data
- PotionData to set the base potion state to@NotNull PotionData getBasePotionData()
@NotNull Color getColor()
void setColor(@NotNull Color color)
color
- arrow colorboolean hasCustomEffects()
@NotNull List<PotionEffect> getCustomEffects()
Plugins should check that hasCustomEffects() returns true before calling this method.
boolean addCustomEffect(@NotNull PotionEffect effect, boolean overwrite)
effect
- the potion effect to addoverwrite
- true if any existing effect of the same type should be
overwrittenboolean removeCustomEffect(@NotNull PotionEffectType type)
type
- the potion effect type to removeIllegalArgumentException
- if this operation would leave the Arrow
in a state with no Custom Effects and PotionType.UNCRAFTABLEboolean hasCustomEffect(@Nullable PotionEffectType type)
type
- the potion effect type to check forvoid clearCustomEffects()
IllegalArgumentException
- if this operation would leave the Arrow
in a state with no Custom Effects and PotionType.UNCRAFTABLECopyright © 2020. All rights reserved.