接口 LightningStrike
- 所有超级接口:
CommandSender,Entity,Metadatable,Nameable,Permissible,PersistentDataHolder,ServerOperator
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明获取导致此雷击的Player。int获取雷击被移除前将会发生的闪烁次数。int获取此雷击对其命中实体造成伤害的持续刻数。booleanisEffect()返回雷击是否是没有伤害的效果。voidsetCausingPlayer(@Nullable Player player) 设置导致此雷击的Player。voidsetFlashes(int flashes) 设置雷击被移除前将会发生的闪烁次数。voidsetLifeTicks(int ticks) 设置此雷击对其命中实体造成伤害的持续刻数。spigot()从接口继承的方法 org.bukkit.command.CommandSender
getName, sendMessage, sendMessage, sendMessage, sendMessage从接口继承的方法 org.bukkit.entity.Entity
addPassenger, addScoreboardTag, copy, copy, createSnapshot, eject, getAsString, getBoundingBox, getEntityId, getFacing, getFallDistance, getFireTicks, getFreezeTicks, getHeight, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getMaxFreezeTicks, getNearbyEntities, getPassenger, getPassengers, getPistonMoveReaction, getPortalCooldown, getPose, getScoreboardTags, getServer, getSpawnCategory, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTicksLived, getTrackedBy, getType, getUniqueId, getVehicle, getVelocity, getWidth, getWorld, hasGravity, isCustomNameVisible, isDead, isEmpty, isFrozen, isGlowing, isInsideVehicle, isInvulnerable, isInWater, isInWorld, isOnGround, isPersistent, isSilent, isValid, isVisibleByDefault, isVisualFire, leaveVehicle, playEffect, remove, removePassenger, removeScoreboardTag, setCustomNameVisible, setFallDistance, setFireTicks, setFreezeTicks, setGlowing, setGravity, setInvulnerable, setLastDamageCause, setPassenger, setPersistent, setPortalCooldown, setRotation, setSilent, setTicksLived, setVelocity, setVisibleByDefault, setVisualFire, teleport, teleport, teleport, teleport从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata从接口继承的方法 org.bukkit.Nameable
getCustomName, setCustomName从接口继承的方法 org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer从接口继承的方法 org.bukkit.permissions.ServerOperator
isOp, setOp
-
方法详细资料
-
isEffect
boolean isEffect()返回雷击是否是没有伤害的效果。原文:Returns whether the strike is an effect that does no damage.
- 返回:
- 雷击是否为效果
-
getFlashes
int getFlashes()获取雷击被移除前将会发生的闪烁次数。默认情况下此值在 1 到 3 之间。原文: Get the amount of flashes that will occur before the lightning is removed. By default this value is between 1 and 3.
- 返回:
- 闪烁次数
-
setFlashes
void setFlashes(int flashes) 设置雷击被移除前将会发生的闪烁次数。当此雷击的生命值降至 0 以下时将会发生一次闪烁。原文: Set the amount of flashes that will occur before the lightning is removed. One flash will occur after this lightning strike's life has reduced below 0.
- 参数:
flashes- 闪烁次数
-
getLifeTicks
int getLifeTicks()获取此雷击对其命中实体造成伤害的持续刻数。当生命刻数为负时,有随机几率触发另一次闪烁并将生命刻数重置为 1。
原文: Get the amount of ticks this lightning strike will inflict damage upon its hit entities. When life ticks are negative, there is a random chance that another flash will be initiated and life ticks reset to 1.
- 返回:
- 生命刻数
-
setLifeTicks
void setLifeTicks(int ticks) 设置此雷击对其命中实体造成伤害的持续刻数。当生命刻数为负时,有随机几率触发另一次闪烁并将生命刻数重置为 1。 此外,如果生命刻数设置为 2(雷击生成时的默认值),将会触发一系列事件:
- 播放冲击音效
- 生成火焰(取决于难度)
- 激活避雷针(如果被击中)
- 剥离铜锈(如果被击中)
- 触发
GameEvent.LIGHTNING_STRIKE游戏事件
原文: Get the amount of ticks this lightning strike will inflict damage upon its hit entities. When life ticks are negative, there is a random chance that another flash will be initiated and life ticks reset to 1. Additionally, if life ticks are set to 2 (the default value when a lightning strike has been spawned), a list of events will occur.
- 参数:
ticks- 生命刻数
-
getCausingPlayer
获取导致此雷击的Player。当玩家在暴风雨中向实体投掷带有引雷附魔的三叉戟时会自然触发此情况。原文: Get the
Playerthat caused this lightning to strike. This will occur naturally if a trident enchanted withChannelingwere thrown at an entity during a storm.- 返回:
- 导致雷击的玩家
-
setCausingPlayer
- 参数:
player- 导致雷击的玩家
-
spigot
- 指定者:
spigot在接口中CommandSender- 指定者:
spigot在接口中Entity
-