-
Notifications
You must be signed in to change notification settings - Fork 0
DSL Conditions
DarkBladeDev edited this page Feb 21, 2026
·
2 revisions
Las condiciones se declaran en event.conditions como un mapa. Cada entrada puede usar un type explícito o asumir el nombre de la key.
Formato recomendado:
event:
conditions:
c1:
type: players_online
min: 5
c2:
type: random_chance
chance: 0.25- type: players_online
min: 1Verdadero si onlinePlayers >= min.
Evalúa una expresión MVEL que debe devolver boolean.
- type: expression
expression: "players_online > 0 && world_time < 12000"Variables disponibles: context.getVariables() (ver Variables).
Verdadero si el tiempo del mundo está en el rango [min, max] (con wrap-around).
- type: world_time
min: 0
max: 12000Valores en ticks de Minecraft (0..23999).
- type: random_chance
chance: 0.25- Si
chance > 1, se interpreta como porcentaje (ej.25→ 0.25).
- type: variable_equals
key: phase
value: "BOSS"Compara String.valueOf(context.getVariable(key)) contra value.
Usa rangos de tiempo de Minecraft:
- day:
time < 12300 || time >= 23850 - night:
time >= 12300 && time < 23850
-
is_raining:world.hasStorm() -
is_thundering:world.isThundering()
Basado en context.getParticipants().size().
- type: participants_count_gt
value: 3Verdadero si algún participante online tiene el permiso.
- type: any_participant_has_permission
permission: "my.perm"- type: world_difficulty_is
difficulty: "HARD"Acepta nombres de org.bukkit.Difficulty (default fallback: NORMAL).
CustomEventEngine • Paper/Spigot API 1.20+ • Java 21