registerInstance

fun <T : VitalMinigameInstance> registerInstance(instance: T, afterRegisterAction: Consumer<T> = Consumer {})

Registers a new game instance on this service. An instance may perform custom logic during registration via VitalMinigameInstance.onRegister. Additionally, an afterRegisterAction function can be provided to perform an action right after instance registration, but before VitalMinigameInstance.onRegister is called.

Fails if an instance with the same id as instance already exists.