Saltar al contenido principal

Scripting Lua: Enums y valores

webapp_banner.jpg

Esta página enlaza a los Javadocs de Spigot para cada tipo de enum usado por los métodos Lua de EliteMobs. Use el nombre exacto de la constante enum (ej. "FLAME", "ZOMBIE", "STONE") como cadena en su código Lua.

  • La ortografía debe coincidir exactamente con el nombre de la constante enum
  • El caso generalmente se normaliza internamente, pero coincida con la ortografía de Javadoc para estar seguro
  • Si el nombre es incorrecto, EliteMobs registra una advertencia y no hace nada

Enum Reference

EnumUsed forJavadoc
BarColorBoss bar colorBarColor
BarStyleBoss bar styleBarStyle
DamageCauseDamage cause filteringEntityDamageEvent.DamageCause
EnderDragon.PhaseEnder dragon phase controlEnderDragon.Phase
EntityEffectEntity visual effectsEntityEffect
EntityTypeEntity spawningEntityType
EquipmentSlotEntity equipment slotsEquipmentSlot
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