Package net.glowstone.entity
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
A GlowLightning strike is an entity produced during thunderstorms.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.entity.Entity
org.bukkit.entity.Entity.Spigot
Nested classes/interfaces inherited from interface org.bukkit.entity.LightningStrike
org.bukkit.entity.LightningStrike.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
ConstructorDescriptionGlowLightningStrike
(org.bukkit.Location location) GlowLightningStrike
(org.bukkit.Location location, boolean effect, boolean isSilent) Creates a lightning strike. -
Method Summary
Modifier and TypeMethodDescriptionList<com.flowpowered.network.Message>
Creates a list ofMessage
s which can be sent to a client to spawn this entity.List<com.flowpowered.network.Message>
createUpdateMessage
(GlowSession session) Creates aMessage
which can be sent to a client to update this entity.int
int
List<org.bukkit.entity.Entity>
getNearbyEntities
(double x, double y, double z) org.bukkit.entity.EntityType
getType()
boolean
isEffect()
Whether the lightning strike is just for effect.void
pulse()
Called every game cycle.void
setFlashCount
(int flashCount) void
setLifeTicks
(int i) void
setRotation
(float yaw, float pitch) org.bukkit.entity.LightningStrike.Spigot
spigot()
Methods inherited from class net.glowstone.entity.GlowEntity
addAttachment, addAttachment, addAttachment, addAttachment, addPassenger, addScoreboardTag, collide, createAfterSpawnMessage, 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, getOrigin, getPassenger, getPassengers, getPersistentDataContainer, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasDefaultLandingBehavior, hasFriction, hasGravity, hashCode, hasMetadata, hasMoved, hasPermission, hasPermission, hasRotated, intersects, isCustomNameVisible, isDead, isEmpty, isGlowing, isInBubbleColumn, isInLava, isInMaterial, isInRain, isInsideVehicle, isInvulnerable, isInWater, isInWaterOrBubbleColumn, isInWaterOrRain, isInWaterOrRainOrBubbleColumn, isLeashed, isOnGround, isOp, isPermissionSet, isPermissionSet, isPersistent, isRemoved, isSilent, isTeleported, isTicking, isTouchingMaterial, isValid, isWithinDistance, isWithinDistance, leaveVehicle, playEffect, playEffectKnownAndSelf, pulsePhysics, recalculatePermissions, remove, removeAttachment, removeMetadata, removePassenger, removeScoreboardTag, reset, sendMessage, sendMessage, sendMessage, sendMessage, setAirDrag, setApplyDragBeforeAccel, setBoundingBox, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setFriction, setGlowing, setGravity, setGravityAccel, setInvulnerable, setLastDamageCause, setLeashHolder, setLeashHolderUniqueId, setLiquidDrag, setMetadata, setOnGround, setOp, setPassenger, setPersistent, setPortalCooldown, setRawLocation, setRawLocation, 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 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, getOrigin, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getTicksLived, 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, 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.permissions.ServerOperator
isOp, setOp
-
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 strikeeffect
- true if this lightning strike doesn't damage entities or start firesisSilent
- true to suppress the sound effect
-
-
Method Details
-
getType
public org.bukkit.entity.EntityType getType()- Specified by:
getType
in interfaceorg.bukkit.entity.Entity
- Overrides:
getType
in classGlowEntity
-
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
-
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.
-
createUpdateMessage
Description copied from class:GlowEntity
Creates aMessage
which can be sent to a client to update this entity.- Overrides:
createUpdateMessage
in classGlowEntity
- 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 interfaceorg.bukkit.entity.Entity
- Overrides:
setRotation
in classGlowEntity
-
getNearbyEntities
- Specified by:
getNearbyEntities
in interfaceorg.bukkit.entity.Entity
- Overrides:
getNearbyEntities
in classGlowEntity
-
spigot
public org.bukkit.entity.LightningStrike.Spigot spigot()- Specified by:
spigot
in interfaceorg.bukkit.command.CommandSender
- Specified by:
spigot
in interfaceorg.bukkit.entity.Entity
- Specified by:
spigot
in interfaceorg.bukkit.entity.LightningStrike
- Overrides:
spigot
in classGlowEntity
-
getLifeTicks
public int getLifeTicks()- Specified by:
getLifeTicks
in interfaceorg.bukkit.entity.LightningStrike
-
setLifeTicks
public void setLifeTicks(int i) - Specified by:
setLifeTicks
in interfaceorg.bukkit.entity.LightningStrike
-
isEffect
public boolean isEffect()Whether the lightning strike is just for effect.- Specified by:
isEffect
in interfaceorg.bukkit.entity.LightningStrike
-
getFlashCount
public int getFlashCount()- Specified by:
getFlashCount
in interfaceorg.bukkit.entity.LightningStrike
-
setFlashCount
public void setFlashCount(int flashCount) - Specified by:
setFlashCount
in interfaceorg.bukkit.entity.LightningStrike
-