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

public abstract class GlowProjectile extends GlowEntity implements org.bukkit.entity.Projectile
A projectile. Subclasses must call GlowEntity.setBoundingBox(double, double) if they are to collide with other entities.
  • 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 interface org.bukkit.entity.Projectile
    • createSpawnMessage

      public List<com.flowpowered.network.Message> createSpawnMessage()
      Description copied from class: GlowEntity
      Creates a list of Messages 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 class GlowEntity
      Returns:
      A list of messages which can spawn this entity.
    • pulsePhysics

      protected void pulsePhysics()
      Overrides:
      pulsePhysics in class GlowEntity
    • hasDefaultLandingBehavior

      protected boolean hasDefaultLandingBehavior()
      Description copied from class: GlowEntity
      If true, GlowEntity.setRawLocation(Location, boolean) with fall true will call GlowEntity.setOnGround(boolean) according to whether or not our location is inside a solid block.
      Overrides:
      hasDefaultLandingBehavior in class GlowEntity
      Returns:
      true to call GlowEntity.setOnGround(boolean) from GlowEntity.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 class GlowEntity
      Parameters:
      block - a block whose type Material.isOccluding()
    • collide

      public abstract void collide(org.bukkit.entity.LivingEntity entity)
    • getObjectId

      protected abstract int getObjectId()
    • doesBounce

      public boolean doesBounce()
      Specified by:
      doesBounce in interface org.bukkit.entity.Projectile
    • isGlowing

      public boolean isGlowing()
      Specified by:
      isGlowing in interface org.bukkit.entity.Entity
      Overrides:
      isGlowing in class GlowEntity
    • setGlowing

      public void setGlowing(boolean glowing)
      Specified by:
      setGlowing in interface org.bukkit.entity.Entity
      Overrides:
      setGlowing in class GlowEntity
    • isInvulnerable

      public boolean isInvulnerable()
      Description copied from class: GlowEntity
      Whether this entity is invulnerable.
      Specified by:
      isInvulnerable in interface org.bukkit.entity.Entity
      Overrides:
      isInvulnerable in class GlowEntity
    • setInvulnerable

      public void setInvulnerable(boolean invulnerable)
      Description copied from class: GlowEntity
      Whether this entity is invulnerable.
      Specified by:
      setInvulnerable in interface org.bukkit.entity.Entity
      Overrides:
      setInvulnerable in class GlowEntity
    • getShooter

      public org.bukkit.projectiles.ProjectileSource getShooter()
      Specified by:
      getShooter in interface org.bukkit.entity.Projectile
    • setBounce

      public void setBounce(boolean bounce)
      Specified by:
      setBounce in interface org.bukkit.entity.Projectile
    • getOwner

      public UUID getOwner()
    • setOwner

      public void setOwner(UUID owner)