Package net.glowstone.entity.projectile
Class GlowProjectile
java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.projectile.GlowProjectile
- 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.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:
GlowArrow
,GlowEgg
,GlowEnderPearl
,GlowFireball
,GlowFishingHook
,GlowSnowball
,GlowSplashPotion
,GlowThrownExpBottle
A projectile. Subclasses must call
GlowEntity.setBoundingBox(double, double)
if they are to collide
with other entities.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot
-
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 TypeMethodDescriptionabstract void
collide
(org.bukkit.block.Block block) Collide with the target block.abstract void
collide
(org.bukkit.entity.LivingEntity entity) List<com.flowpowered.network.Message>
Creates a list ofMessage
s which can be sent to a client to spawn this entity.boolean
protected abstract int
getOwner()
org.bukkit.projectiles.ProjectileSource
protected boolean
If true,GlowEntity.setRawLocation(Location, boolean)
withfall
true will callGlowEntity.setOnGround(boolean)
according to whether or not our location is inside a solid block.boolean
boolean
Whether this entity is invulnerable.protected void
void
setBounce
(boolean bounce) void
setGlowing
(boolean glowing) void
setInvulnerable
(boolean invulnerable) Whether this entity is invulnerable.void
void
setShooter
(org.bukkit.projectiles.ProjectileSource shooter) 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, pulse, 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, setOnGround, setOp, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, setRotation, setSilent, setSize, setTicksLived, setUniqueId, setVelocity, shouldSave, spigot, 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 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, isInBubbleColumn, isInLava, isInRain, isInsideVehicle, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isOnGround, isPersistent, isSilent, isTicking, isValid, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setGravity, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, spigot, 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.permissions.ServerOperator
isOp, setOp
-
Constructor Details
-
GlowProjectile
public GlowProjectile(org.bukkit.Location location) Creates a projectile.- Parameters:
location
- the initial location
-
-
Method Details
-
setShooter
public void setShooter(org.bukkit.projectiles.ProjectileSource shooter) - Specified by:
setShooter
in interfaceorg.bukkit.entity.Projectile
-
createSpawnMessage
Description copied from class:GlowEntity
Creates a list ofMessage
s which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.- Specified by:
createSpawnMessage
in classGlowEntity
- Returns:
- A list of messages which can spawn this entity.
-
pulsePhysics
protected void pulsePhysics()- Overrides:
pulsePhysics
in classGlowEntity
-
hasDefaultLandingBehavior
protected boolean hasDefaultLandingBehavior()Description copied from class:GlowEntity
If true,GlowEntity.setRawLocation(Location, boolean)
withfall
true will callGlowEntity.setOnGround(boolean)
according to whether or not our location is inside a solid block.- Overrides:
hasDefaultLandingBehavior
in classGlowEntity
- Returns:
- true to call
GlowEntity.setOnGround(boolean)
fromGlowEntity.setRawLocation(Location, boolean)
; false otherwise
-
collide
public abstract void collide(org.bukkit.block.Block block) Description copied from class:GlowEntity
Collide with the target block.- Overrides:
collide
in classGlowEntity
- Parameters:
block
- a block whose typeMaterial.isOccluding()
-
collide
public abstract void collide(org.bukkit.entity.LivingEntity entity) -
getObjectId
protected abstract int getObjectId() -
doesBounce
public boolean doesBounce()- Specified by:
doesBounce
in interfaceorg.bukkit.entity.Projectile
-
isGlowing
public boolean isGlowing()- Specified by:
isGlowing
in interfaceorg.bukkit.entity.Entity
- Overrides:
isGlowing
in classGlowEntity
-
setGlowing
public void setGlowing(boolean glowing) - Specified by:
setGlowing
in interfaceorg.bukkit.entity.Entity
- Overrides:
setGlowing
in classGlowEntity
-
isInvulnerable
public boolean isInvulnerable()Description copied from class:GlowEntity
Whether this entity is invulnerable.- Specified by:
isInvulnerable
in interfaceorg.bukkit.entity.Entity
- Overrides:
isInvulnerable
in classGlowEntity
-
setInvulnerable
public void setInvulnerable(boolean invulnerable) Description copied from class:GlowEntity
Whether this entity is invulnerable.- Specified by:
setInvulnerable
in interfaceorg.bukkit.entity.Entity
- Overrides:
setInvulnerable
in classGlowEntity
-
getShooter
public org.bukkit.projectiles.ProjectileSource getShooter()- Specified by:
getShooter
in interfaceorg.bukkit.entity.Projectile
-
setBounce
public void setBounce(boolean bounce) - Specified by:
setBounce
in interfaceorg.bukkit.entity.Projectile
-
getOwner
-
setOwner
-