public interface Arrow extends AbstractArrow
AbstractArrow.PickupRule, AbstractArrow.PickupStatus
Entity.Spigot
Modifier and Type | Method and Description |
---|---|
boolean |
addCustomEffect(@NotNull PotionEffect effect,
boolean overwrite)
Adds a custom potion effect to this arrow.
|
void |
clearCustomEffects()
Removes all custom potion effects from this arrow.
|
@NotNull PotionData |
getBasePotionData()
Returns the potion data about the base potion
|
@NotNull Color |
getColor()
Gets the color of this arrow.
|
@NotNull List<PotionEffect> |
getCustomEffects()
Gets an immutable list containing all custom potion effects applied to
this arrow.
|
boolean |
hasCustomEffect(@Nullable 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(@NotNull PotionEffectType type)
Removes a custom potion effect from this arrow.
|
void |
setBasePotionData(@NotNull PotionData data)
Sets the underlying potion data
|
void |
setColor(@NotNull Color color)
Sets the color of this arrow.
|
getAttachedBlock, getDamage, getItemStack, getKnockbackStrength, getPickupRule, getPickupStatus, getPierceLevel, isCritical, isInBlock, isShotFromCrossbow, setCritical, setDamage, setKnockbackStrength, setPickupRule, setPickupStatus, setPierceLevel, setShotFromCrossbow
doesBounce, getShooter, setBounce, setShooter
addPassenger, addScoreboardTag, asHoverEvent, eject, fromMobSpawner, getBoundingBox, getChunk, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, spigot, teleport, teleport, teleport, teleport, teleportAsync, teleportAsync
getMetadata, hasMetadata, removeMetadata, setMetadata
getName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage
audience, audience, clearTitle, empty, hideBossBar, openBook, openBook, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, showBossBar, showTitle, stopSound, toAudience
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
isOp, setOp
customName, customName, getCustomName, setCustomName
getPersistentDataContainer
void setBasePotionData(@NotNull @NotNull PotionData data)
data
- PotionData to set the base potion state to@NotNull @NotNull PotionData getBasePotionData()
void setColor(@NotNull @NotNull Color color)
color
- arrow colorboolean hasCustomEffects()
@NotNull @NotNull List<PotionEffect> getCustomEffects()
Plugins should check that hasCustomEffects() returns true before calling this method.
boolean addCustomEffect(@NotNull @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 @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 @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 © 2021. All rights reserved.