Skip to content

API Reference

DarkBladeDev edited this page Feb 21, 2026 · 1 revision

API Reference (com.darkbladedev.cee.api)

Esta referencia describe las interfaces públicas del proyecto.

CustomEventEngine

  • registerAction(String id, ActionFactory factory)
  • registerCondition(String id, ConditionFactory factory)
  • registerTrigger(String id, TriggerFactory factory)
  • registerScope(String id, ScopeFactory factory)
  • registerChunkStrategy(String id, ChunkSelectionStrategy strategy)
  • Optional<EventHandle> getActiveEvent(ChunkPos chunkPos)
  • StartResult startEvent(String eventId, ChunkPos chunkPos)

EventHandle

Representa un runtime activo.

  • String getEventId()
  • UUID getRuntimeId()
  • EventState getState()
  • void cancel()

EventContext

Contexto entregado a actions y conditions.

  • Server getServer()
  • World getWorld()
  • Set<UUID> getParticipants()
  • Map<String, Object> getVariables()
  • Object getVariable(String key)
  • void setVariable(String key, Object value)

Action / Condition

  • Action.execute(EventContext context)
  • Condition.evaluate(EventContext context)

Factories

  • ActionFactory.create(Map<String, Object> config)
  • ConditionFactory.create(Map<String, Object> config)
  • TriggerFactory.create(Map<String, Object> config, String eventId)
  • ScopeFactory.create(Map<String, Object> config)

Trigger / TriggerContext

Un trigger puede registrar listeners/tasks y luego disparar al motor con TriggerContext.

TriggerContext:

  • String getEventId()
  • Optional<World> getWorld()
  • Optional<Location> getLocation()

ChunkPos

Posición por chunk:

  • UUID worldId
  • int x, int z
  • offset(dx, dz)

ChunkSelectionStrategy

  • Optional<ChunkPos> select(World world, TriggerContext context)

Scope

  • Set<ChunkPos> resolveChunks(ChunkPos origin)

StartResult

Resultado de intentar iniciar un evento.

  • SUCCESS
  • NOT_FOUND
  • CHUNK_OCCUPIED
  • INVALID_TARGET
  • CONDITIONS_FAILED

Clone this wiki locally