From 803345d09dfa5898b24e929afb5d536b6e042374 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Sun, 12 Jan 2025 12:24:29 +0800 Subject: [PATCH] Fix regen command test by disabling confirm --- .../mvplugins/multiverse/core/commands/RegenCommandTest.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/org/mvplugins/multiverse/core/commands/RegenCommandTest.kt b/src/test/java/org/mvplugins/multiverse/core/commands/RegenCommandTest.kt index f6bdd909a..74067c3f3 100644 --- a/src/test/java/org/mvplugins/multiverse/core/commands/RegenCommandTest.kt +++ b/src/test/java/org/mvplugins/multiverse/core/commands/RegenCommandTest.kt @@ -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.* @@ -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() }