Перейти к основному содержимому

Lua-скриптинг: Перечисления и значения

webapp_banner.jpg

Эта страница содержит ссылки на Spigot Javadocs для каждого типа перечислений, используемого методами Lua EliteMobs. Используйте точное имя константы перечисления (напр. "FLAME", "ZOMBIE", "STONE") как строку в вашем Lua-коде.

  • Написание должно точно совпадать с именем константы перечисления
  • Регистр обычно нормализуется внутренне, но для надёжности совпадайте с написанием Javadoc
  • Если имя неверное, EliteMobs записывает предупреждение и ничего не делает

Enum Reference

EnumUsed forJavadoc
BarColorBoss bar colorBarColor
BarStyleBoss bar styleBarStyle
EntityEffectEntity visual effectsEntityEffect
EntityTypeEntity spawningEntityType
FireworkEffect.TypeFirework shapeFireworkEffect.Type
MaterialBlocks and itemsMaterial
ParticleParticle effectsParticle
PotionEffectTypePotion effectsPotionEffectType

Non-Spigot Values

Zone shapes

nUsed 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

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

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

Weather values

nUsed by context.world:set_weather(weather).

ValueEffect
CLEARClear skies
RAINRain
THUNDERThunderstorm

Target types

nUsed 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