Pular para o conteúdo principal

Scripting Lua: Enums e valores

webapp_banner.jpg

Esta página contém links para os Javadocs do Spigot para cada tipo de enum usado pelos métodos Lua do EliteMobs. Use o nome exato da constante enum (ex. "FLAME", "ZOMBIE", "STONE") como string no seu código Lua.

  • A ortografia deve corresponder exatamente ao nome da constante enum
  • O caso geralmente é normalizado internamente, mas corresponda à ortografia do Javadoc por segurança
  • Se o nome estiver errado, o EliteMobs registra um aviso e não faz nada

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