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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcollide(org.bukkit.block.Block block) Collide with the target block.abstract voidcollide(org.bukkit.entity.LivingEntity entity) List<com.flowpowered.network.Message>Creates a list ofMessages which can be sent to a client to spawn this entity.booleanprotected abstract intgetOwner()org.bukkit.projectiles.ProjectileSourceprotected booleanIf true,GlowEntity.setRawLocation(Location, boolean)withfalltrue will callGlowEntity.setOnGround(boolean)according to whether or not our location is inside a solid block.booleanbooleanWhether this entity is invulnerable.protected voidvoidsetBounce(boolean bounce) voidsetGlowing(boolean glowing) voidsetInvulnerable(boolean invulnerable) Whether this entity is invulnerable.voidvoidsetShooter(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, updateBoundingBoxMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, stopSoundMethods inherited from interface org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageMethods 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, teleportAsyncMethods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEventMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachmentMethods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainerMethods 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:
setShooterin interfaceorg.bukkit.entity.Projectile
-
createSpawnMessage
Description copied from class:GlowEntityCreates a list ofMessages which can be sent to a client to spawn this entity. Implementations in concrete subclasses may return a shallowly immutable list.- Specified by:
createSpawnMessagein classGlowEntity- Returns:
- A list of messages which can spawn this entity.
-
pulsePhysics
protected void pulsePhysics()- Overrides:
pulsePhysicsin classGlowEntity
-
hasDefaultLandingBehavior
protected boolean hasDefaultLandingBehavior()Description copied from class:GlowEntityIf true,GlowEntity.setRawLocation(Location, boolean)withfalltrue will callGlowEntity.setOnGround(boolean)according to whether or not our location is inside a solid block.- Overrides:
hasDefaultLandingBehaviorin 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:GlowEntityCollide with the target block.- Overrides:
collidein 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:
doesBouncein interfaceorg.bukkit.entity.Projectile
-
isGlowing
public boolean isGlowing()- Specified by:
isGlowingin interfaceorg.bukkit.entity.Entity- Overrides:
isGlowingin classGlowEntity
-
setGlowing
public void setGlowing(boolean glowing) - Specified by:
setGlowingin interfaceorg.bukkit.entity.Entity- Overrides:
setGlowingin classGlowEntity
-
isInvulnerable
public boolean isInvulnerable()Description copied from class:GlowEntityWhether this entity is invulnerable.- Specified by:
isInvulnerablein interfaceorg.bukkit.entity.Entity- Overrides:
isInvulnerablein classGlowEntity
-
setInvulnerable
public void setInvulnerable(boolean invulnerable) Description copied from class:GlowEntityWhether this entity is invulnerable.- Specified by:
setInvulnerablein interfaceorg.bukkit.entity.Entity- Overrides:
setInvulnerablein classGlowEntity
-
getShooter
public org.bukkit.projectiles.ProjectileSource getShooter()- Specified by:
getShooterin interfaceorg.bukkit.entity.Projectile
-
setBounce
public void setBounce(boolean bounce) - Specified by:
setBouncein interfaceorg.bukkit.entity.Projectile
-
getOwner
-
setOwner
-