Lua-скриптинг: Перечисления и значения
Эта страница содержит ссылки на Spigot Javadocs для каждого типа перечислений, используемого методами Lua EliteMobs. Используйте точное имя константы перечисления (напр. "FLAME", "ZOMBIE", "STONE") как строку в вашем Lua-коде.
- Написание должно точно совпадать с именем константы перечисления
- Регистр обычно нормализуется внутренне, но для надёжности совпадайте с написанием Javadoc
- Если имя неверное, EliteMobs записывает предупреждение и ничего не делает
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 |
