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

Lua Scripting: Enums & Values

webapp_banner.jpg

This page links to the Spigot Javadocs for every enum type used by EliteMobs Lua methods. Use the exact enum constant name (e.g., "FLAME", "ZOMBIE", "STONE") as a string in your Lua code.

  • Spelling must match the enum constant name exactly
  • Case is usually normalized internally, but match the Javadoc spelling to be safe
  • If the name is wrong, EliteMobs logs a warning and does nothing

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

These values are EliteMobs-specific and not in the 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
STORMThunderstorm

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