メインコンテンツまでスキップ

Luaスクリプティング:列挙型と値

webapp_banner.jpg

このページは、EliteMobs Luaメソッドで使用されるすべてのenum型についてSpigot Javadocsにリンクしています。Luaコードでは正確なenum定数名(例:"FLAME""ZOMBIE""STONE")を文字列として使用してください。

  • スペルはenum定数名と正確に一致する必要があります
  • 大文字小文字は通常内部で正規化されますが、安全のためにJavadocのスペルに合わせてください
  • 名前が間違っている場合、EliteMobsは警告をログに記録し、何もしません

Enum Reference

EnumUsed forJavadoc
BarColorBoss bar colorBarColor
BarStyleBoss bar styleBarStyle
DamageCauseダメージ原因フィルタリングEntityDamageEvent.DamageCause
EnderDragon.Phaseエンダードラゴンフェーズ制御EnderDragon.Phase
EntityEffectEntity visual effectsEntityEffect
EntityTypeEntity spawningEntityType
EquipmentSlotエンティティ装備スロットEquipmentSlot
FireworkEffect.TypeFirework shapeFireworkEffect.Type
MaterialBlocks and itemsMaterial
ParticleParticle effectsParticle -- レガシー名の変換については有効なパーティクルリストも参照してください
PotionEffectTypePotion effectsPotionEffectType
Soundサウンド再生Sound

Non-Spigot Values

これらの値はEliteMobs固有であり、Spigot Javadocsには含まれていません:

Zone shapes

Used by native zone definitions (kind field) and script utility zone specs (shape field).

Native (kind)Script Utility (shape)
sphereSPHERE
domeDOME
cylinderCYLINDER
cuboidCUBOID
coneCONE
static_raySTATIC_RAY
rotating_rayROTATING_RAY
translating_rayTRANSLATING_RAY

Entity filters

Used by context.zones and context.entities query options.

FilterMatches
playerPlayers only
eliteElite mobs only
mobNon-player living entities
livingAll living entities (default)

Weather values

Used by context.world:set_weather(weather).

ValueEffect
CLEARClear skies
RAINRain
THUNDERThunderstorm

Target types

Used by context.script:target() specs.

ValueResolves to
SELFThe boss entity
SELF_SPAWNThe boss's spawn location
DIRECT_TARGETThe entity involved in the current event
NEARBY_PLAYERSPlayers within range of the boss
NEARBY_MOBSNon-player mobs within range
NEARBY_ELITESElite mobs within range
ALL_PLAYERSAll online players
WORLD_PLAYERSAll players in the boss's world
ZONE_FULLEntities/locations inside a zone volume
ZONE_BORDEREntities/locations on a zone border
LOCATIONA specific location from the spec

次のステップ