Use MultiverseWorld instead of worldname string for RemoveCommand

This commit is contained in:
Ben Woo 2023-09-20 12:06:08 +08:00
parent fb240a19fa
commit b99de26deb
No known key found for this signature in database
GPG Key ID: FB2A3645536E12C8
1 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@ import org.mvplugins.multiverse.core.commandtools.MVCommandIssuer;
import org.mvplugins.multiverse.core.commandtools.MVCommandManager;
import org.mvplugins.multiverse.core.commandtools.MultiverseCommand;
import org.mvplugins.multiverse.core.utils.MVCorei18n;
import org.mvplugins.multiverse.core.world.MultiverseWorld;
import org.mvplugins.multiverse.core.world.WorldManager;
@Service
@ -43,8 +44,8 @@ class RemoveCommand extends MultiverseCommand {
@Conditions("mvworlds:scope=both")
@Syntax("<world>")
@Description("{@@mv-core.remove.world.description}")
String worldName) {
worldManager.removeWorld(worldName)
MultiverseWorld world) {
worldManager.removeWorld(world)
.onSuccess(removedWorldName -> {
Logging.fine("World remove success: " + removedWorldName);
issuer.sendInfo(MVCorei18n.REMOVEWORLD_REMOVED, "{world}", removedWorldName);