Package net.glowstone.entity.projectile
Class GlowArrow
java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.projectile.GlowProjectile
net.glowstone.entity.projectile.GlowArrow
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience
,net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>
,org.bukkit.command.CommandSender
,org.bukkit.entity.AbstractArrow
,org.bukkit.entity.Arrow
,org.bukkit.entity.Entity
,org.bukkit.entity.Projectile
,org.bukkit.metadata.Metadatable
,org.bukkit.Nameable
,org.bukkit.permissions.Permissible
,org.bukkit.permissions.ServerOperator
,org.bukkit.persistence.PersistentDataHolder
- Direct Known Subclasses:
GlowSpectralArrow
,GlowTippedArrow
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.AbstractArrow
org.bukkit.entity.AbstractArrow.PickupRule, org.bukkit.entity.AbstractArrow.PickupStatus
-
Field Summary
Fields inherited from class net.glowstone.entity.GlowEntity
active, airDrag, applyDragBeforeAccel, boundingBox, ENTITY_ID_NOBODY, entityId, gravityAccel, liquidDrag, location, metadata, passengerChanged, previousLocation, removed, server, slipMultiplier, teleported, ticksLived, vehicle, velocity, velocityChanged, world, worldLock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addCustomEffect
(@NotNull org.bukkit.potion.PotionEffect potionEffect, boolean b) void
void
collide
(org.bukkit.block.Block block) Collide with the target block.void
collide
(org.bukkit.entity.LivingEntity entity) org.bukkit.block.Block
@NotNull org.bukkit.potion.PotionData
@NotNull org.bukkit.Color
getColor()
@NotNull List<org.bukkit.potion.PotionEffect>
double
@NotNull org.bukkit.inventory.ItemStack
int
short
getLife()
protected int
@NotNull org.bukkit.entity.AbstractArrow.PickupStatus
int
boolean
hasCustomEffect
(@Nullable org.bukkit.potion.PotionEffectType potionEffectType) boolean
boolean
boolean
boolean
void
pulse()
Called every game cycle.protected void
boolean
removeCustomEffect
(@NotNull org.bukkit.potion.PotionEffectType potionEffectType) void
setBasePotionData
(@NotNull org.bukkit.potion.PotionData potionData) void
setColor
(@NotNull org.bukkit.Color color) void
setCritical
(boolean critical) void
setDamage
(double damage) void
setKnockbackStrength
(int knockbackStrength) void
setLife
(short life) void
setOnGround
(boolean onGround) Sets the on-ground flag and clears fall distance.void
setPickupStatus
(@NotNull org.bukkit.entity.AbstractArrow.PickupStatus pickupStatus) void
setPierceLevel
(int i) void
setShotFromCrossbow
(boolean b) @NotNull org.bukkit.entity.Entity.Spigot
spigot()
Methods inherited from class net.glowstone.entity.projectile.GlowProjectile
createSpawnMessage, doesBounce, getOwner, getShooter, hasDefaultLandingBehavior, isGlowing, isInvulnerable, setBounce, setGlowing, setInvulnerable, setOwner, setShooter
Methods inherited from class net.glowstone.entity.GlowEntity
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, createAfterSpawnMessage, createUpdateMessage, customName, customName, damage, damage, damage, damage, eject, entityInteract, equals, fromMobSpawner, getBoundingBox, getCardinalFacing, getChunk, getCustomName, getCustomTags, getDismountLocation, getEffectivePermissions, getEntityId, getEntitySpawnReason, getFacing, getFallDistance, getFireTicks, getGravityAccel, getHeight, getLastDamageCause, getLeashedEntities, getLeashHolder, getLocation, getLocation, getMaxFireTicks, getMetadata, getMetadata, getMountLocation, getName, getNearbyEntities, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasPermission, hasPermission, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isInBubbleColumn, isInLava, isInMaterial, isInRain, isInsideVehicle, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isLeashed, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isRemoved, isSilent, isTeleported, isTicking, isTouchingMaterial, isValid, isWithinDistance, isWithinDistance, leaveVehicle, playEffect, playEffectKnownAndSelf, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, reset, sendMessage, sendMessage, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFriction, setGravity, setGravityAccel, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOp, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setRotation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, shouldSave, teleport, teleport, teleport, teleport, teleportToEnd, teleportToSpawn, toString, updateBoundingBox
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.entity.AbstractArrow
getPickupRule, setPickupRule
Methods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, 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
Methods inherited from interface org.bukkit.command.CommandSender
getName, 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, 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, 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, recalculatePermissions, removeAttachment
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface org.bukkit.entity.Projectile
doesBounce, getShooter, setBounce, setShooter
Methods inherited from interface org.bukkit.permissions.ServerOperator
isOp, setOp
-
Constructor Details
-
GlowArrow
public GlowArrow(org.bukkit.Location location) Creates an arrow entity.- Parameters:
location
- the initial location
-
-
Method Details
-
pulsePhysics
protected void pulsePhysics()- Overrides:
pulsePhysics
in classGlowProjectile
-
setOnGround
public void setOnGround(boolean onGround) Description copied from class:GlowEntity
Sets the on-ground flag and clears fall distance.- Overrides:
setOnGround
in classGlowEntity
- Parameters:
onGround
- true if this entity is now on the ground; false otherwise
-
pulse
public void pulse()Description copied from class:GlowEntity
Called every game cycle. Subclasses should implement this to implement periodic functionality e.g. mob AI.- Overrides:
pulse
in classGlowEntity
-
collide
public void collide(org.bukkit.block.Block block) Description copied from class:GlowEntity
Collide with the target block.- Specified by:
collide
in classGlowProjectile
- Parameters:
block
- a block whose typeMaterial.isOccluding()
-
collide
public void collide(org.bukkit.entity.LivingEntity entity) - Specified by:
collide
in classGlowProjectile
-
getObjectId
protected int getObjectId()- Specified by:
getObjectId
in classGlowProjectile
-
getPierceLevel
public int getPierceLevel()- Specified by:
getPierceLevel
in interfaceorg.bukkit.entity.AbstractArrow
-
setPierceLevel
public void setPierceLevel(int i) - Specified by:
setPierceLevel
in interfaceorg.bukkit.entity.AbstractArrow
-
isCritical
public boolean isCritical()- Specified by:
isCritical
in interfaceorg.bukkit.entity.AbstractArrow
-
setCritical
public void setCritical(boolean critical) - Specified by:
setCritical
in interfaceorg.bukkit.entity.AbstractArrow
-
getPickupStatus
@NotNull public @NotNull org.bukkit.entity.AbstractArrow.PickupStatus getPickupStatus()- Specified by:
getPickupStatus
in interfaceorg.bukkit.entity.AbstractArrow
-
setPickupStatus
public void setPickupStatus(@NotNull @NotNull org.bukkit.entity.AbstractArrow.PickupStatus pickupStatus) - Specified by:
setPickupStatus
in interfaceorg.bukkit.entity.AbstractArrow
-
isShotFromCrossbow
public boolean isShotFromCrossbow()- Specified by:
isShotFromCrossbow
in interfaceorg.bukkit.entity.AbstractArrow
-
setShotFromCrossbow
public void setShotFromCrossbow(boolean b) - Specified by:
setShotFromCrossbow
in interfaceorg.bukkit.entity.AbstractArrow
-
getItemStack
@NotNull public @NotNull org.bukkit.inventory.ItemStack getItemStack()- Specified by:
getItemStack
in interfaceorg.bukkit.entity.AbstractArrow
-
getAttachedBlock
public org.bukkit.block.Block getAttachedBlock()- Specified by:
getAttachedBlock
in interfaceorg.bukkit.entity.AbstractArrow
-
isInBlock
public boolean isInBlock()- Specified by:
isInBlock
in interfaceorg.bukkit.entity.AbstractArrow
-
spigot
public @NotNull org.bukkit.entity.Entity.Spigot spigot()- Specified by:
spigot
in interfaceorg.bukkit.command.CommandSender
- Specified by:
spigot
in interfaceorg.bukkit.entity.Entity
- Overrides:
spigot
in classGlowEntity
-
getBasePotionData
@NotNull public @NotNull org.bukkit.potion.PotionData getBasePotionData()- Specified by:
getBasePotionData
in interfaceorg.bukkit.entity.Arrow
-
setBasePotionData
public void setBasePotionData(@NotNull @NotNull org.bukkit.potion.PotionData potionData) - Specified by:
setBasePotionData
in interfaceorg.bukkit.entity.Arrow
-
getColor
@NotNull public @NotNull org.bukkit.Color getColor()- Specified by:
getColor
in interfaceorg.bukkit.entity.Arrow
-
setColor
public void setColor(@NotNull @NotNull org.bukkit.Color color) - Specified by:
setColor
in interfaceorg.bukkit.entity.Arrow
-
hasCustomEffects
public boolean hasCustomEffects()- Specified by:
hasCustomEffects
in interfaceorg.bukkit.entity.Arrow
-
getCustomEffects
- Specified by:
getCustomEffects
in interfaceorg.bukkit.entity.Arrow
-
addCustomEffect
public boolean addCustomEffect(@NotNull @NotNull org.bukkit.potion.PotionEffect potionEffect, boolean b) - Specified by:
addCustomEffect
in interfaceorg.bukkit.entity.Arrow
-
removeCustomEffect
public boolean removeCustomEffect(@NotNull @NotNull org.bukkit.potion.PotionEffectType potionEffectType) - Specified by:
removeCustomEffect
in interfaceorg.bukkit.entity.Arrow
-
hasCustomEffect
public boolean hasCustomEffect(@Nullable @Nullable org.bukkit.potion.PotionEffectType potionEffectType) - Specified by:
hasCustomEffect
in interfaceorg.bukkit.entity.Arrow
-
clearCustomEffects
public void clearCustomEffects()- Specified by:
clearCustomEffects
in interfaceorg.bukkit.entity.Arrow
-
getKnockbackStrength
public int getKnockbackStrength()- Specified by:
getKnockbackStrength
in interfaceorg.bukkit.entity.AbstractArrow
-
setKnockbackStrength
public void setKnockbackStrength(int knockbackStrength) - Specified by:
setKnockbackStrength
in interfaceorg.bukkit.entity.AbstractArrow
-
getLife
public short getLife() -
setLife
public void setLife(short life) -
getDamage
public double getDamage()- Specified by:
getDamage
in interfaceorg.bukkit.entity.AbstractArrow
-
setDamage
public void setDamage(double damage) - Specified by:
setDamage
in interfaceorg.bukkit.entity.AbstractArrow
-