Class GlowLightningStrike

java.lang.Object
net.glowstone.entity.GlowEntity
net.glowstone.entity.GlowLightningStrike
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.LightningStrike, org.bukkit.metadata.Metadatable, org.bukkit.Nameable, org.bukkit.permissions.Permissible, org.bukkit.permissions.ServerOperator, org.bukkit.persistence.PersistentDataHolder

public class GlowLightningStrike extends GlowEntity implements org.bukkit.entity.LightningStrike
A GlowLightning strike is an entity produced during thunderstorms.
  • Constructor Details

    • GlowLightningStrike

      public GlowLightningStrike(org.bukkit.Location location)
    • GlowLightningStrike

      public GlowLightningStrike(org.bukkit.Location location, boolean effect, boolean isSilent)
      Creates a lightning strike.
      Parameters:
      location - the location to strike
      effect - true if this lightning strike doesn't damage entities or start fires
      isSilent - true to suppress the sound effect
  • Method Details

    • getType

      public org.bukkit.entity.EntityType getType()
      Specified by:
      getType in interface org.bukkit.entity.Entity
      Overrides:
      getType in class GlowEntity
    • 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 class GlowEntity
    • 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.
    • createUpdateMessage

      public List<com.flowpowered.network.Message> createUpdateMessage(GlowSession session)
      Description copied from class: GlowEntity
      Creates a Message which can be sent to a client to update this entity.
      Overrides:
      createUpdateMessage in class GlowEntity
      Parameters:
      session - Session to update this entity for
      Returns:
      A message which can update this entity.
    • setRotation

      public void setRotation(float yaw, float pitch)
      Specified by:
      setRotation in interface org.bukkit.entity.Entity
      Overrides:
      setRotation in class GlowEntity
    • getNearbyEntities

      public List<org.bukkit.entity.Entity> getNearbyEntities(double x, double y, double z)
      Specified by:
      getNearbyEntities in interface org.bukkit.entity.Entity
      Overrides:
      getNearbyEntities in class GlowEntity
    • spigot

      public org.bukkit.entity.LightningStrike.Spigot spigot()
      Specified by:
      spigot in interface org.bukkit.command.CommandSender
      Specified by:
      spigot in interface org.bukkit.entity.Entity
      Specified by:
      spigot in interface org.bukkit.entity.LightningStrike
      Overrides:
      spigot in class GlowEntity
    • getLifeTicks

      public int getLifeTicks()
      Specified by:
      getLifeTicks in interface org.bukkit.entity.LightningStrike
    • setLifeTicks

      public void setLifeTicks(int i)
      Specified by:
      setLifeTicks in interface org.bukkit.entity.LightningStrike
    • isEffect

      public boolean isEffect()
      Whether the lightning strike is just for effect.
      Specified by:
      isEffect in interface org.bukkit.entity.LightningStrike
    • getFlashCount

      public int getFlashCount()
      Specified by:
      getFlashCount in interface org.bukkit.entity.LightningStrike
    • setFlashCount

      public void setFlashCount(int flashCount)
      Specified by:
      setFlashCount in interface org.bukkit.entity.LightningStrike