Scripting Lua: Enums e valores
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
| Enum | Used for | Javadoc |
|---|---|---|
BarColor | Boss bar color | BarColor |
BarStyle | Boss bar style | BarStyle |
EntityEffect | Entity visual effects | EntityEffect |
EntityType | Entity spawning | EntityType |
FireworkEffect.Type | Firework shape | FireworkEffect.Type |
Material | Blocks and items | Material |
Particle | Particle effects | Particle |
PotionEffectType | Potion effects | PotionEffectType |
Non-Spigot Values
Zone shapes
nUsed by native zone definitions (kind field) and script utility zone specs (shape field).
Native (kind) | Script Utility (shape) |
|---|---|
sphere | SPHERE |
dome | DOME |
cylinder | CYLINDER |
cuboid | CUBOID |
cone | CONE |
static_ray | STATIC_RAY |
rotating_ray | ROTATING_RAY |
translating_ray | TRANSLATING_RAY |
Entity filters
nUsed by context.zones and context.entities query options.
| Filter | Matches |
|---|---|
player | Players only |
elite | Elite mobs only |
mob | Non-player living entities |
living | All living entities (default) |
Weather values
nUsed by context.world:set_weather(weather).
| Value | Effect |
|---|---|
CLEAR | Clear skies |
RAIN | Rain |
THUNDER | Thunderstorm |
Target types
nUsed by context.script:target() specs.
| Value | Resolves to |
|---|---|
SELF | The boss entity |
SELF_SPAWN | The boss's spawn location |
DIRECT_TARGET | The entity involved in the current event |
NEARBY_PLAYERS | Players within range of the boss |
NEARBY_MOBS | Non-player mobs within range |
NEARBY_ELITES | Elite mobs within range |
ALL_PLAYERS | All online players |
WORLD_PLAYERS | All players in the boss's world |
ZONE_FULL | Entities/locations inside a zone volume |
ZONE_BORDER | Entities/locations on a zone border |
LOCATION | A specific location from the spec |
