listen

fun listen(server: MinecraftServer, ownerMod: ModContainer, listener: (StrataUiEvent) -> Unit): AutoCloseable(source)

Subscribes to committed notifications on the server owner. Close the subscription on that owner; release and server shutdown also remove it. Listener failures are reported without rolling back a committed transition.