Skip to content

Commit

Permalink
Fix regen command test by disabling confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
benwoo1110 committed Jan 12, 2025
1 parent f1d98a6 commit 803345d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package org.mvplugins.multiverse.core.commands

import org.bukkit.Bukkit
import org.bukkit.GameRule
import org.mvplugins.multiverse.core.commandtools.queue.ConfirmMode
import org.mvplugins.multiverse.core.config.MVCoreConfig
import org.mvplugins.multiverse.core.world.LoadedMultiverseWorld
import org.mvplugins.multiverse.core.world.options.CreateWorldOptions
import kotlin.test.*
Expand All @@ -12,6 +14,11 @@ class RegenCommandTest : AbstractCommandTest() {

@BeforeTest
fun setUp() {
// Disable confirmation to make tests easier
val config = serviceLocator.getActiveService(MVCoreConfig::class.java).takeIf { it != null } ?: run {
throw IllegalStateException("MVCoreConfig is not available as a service") }
config.confirmMode = ConfirmMode.DISABLE

testWorld = worldManager.createWorld(CreateWorldOptions.worldName("test")).get()
}

Expand Down

0 comments on commit 803345d

Please sign in to comment.