Use MultiverseWorld instead of worldname string for RemoveCommand
This commit is contained in:
parent
fb240a19fa
commit
b99de26deb
|
@ -17,6 +17,7 @@ import org.mvplugins.multiverse.core.commandtools.MVCommandIssuer;
|
||||||
import org.mvplugins.multiverse.core.commandtools.MVCommandManager;
|
import org.mvplugins.multiverse.core.commandtools.MVCommandManager;
|
||||||
import org.mvplugins.multiverse.core.commandtools.MultiverseCommand;
|
import org.mvplugins.multiverse.core.commandtools.MultiverseCommand;
|
||||||
import org.mvplugins.multiverse.core.utils.MVCorei18n;
|
import org.mvplugins.multiverse.core.utils.MVCorei18n;
|
||||||
|
import org.mvplugins.multiverse.core.world.MultiverseWorld;
|
||||||
import org.mvplugins.multiverse.core.world.WorldManager;
|
import org.mvplugins.multiverse.core.world.WorldManager;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -43,8 +44,8 @@ class RemoveCommand extends MultiverseCommand {
|
||||||
@Conditions("mvworlds:scope=both")
|
@Conditions("mvworlds:scope=both")
|
||||||
@Syntax("<world>")
|
@Syntax("<world>")
|
||||||
@Description("{@@mv-core.remove.world.description}")
|
@Description("{@@mv-core.remove.world.description}")
|
||||||
String worldName) {
|
MultiverseWorld world) {
|
||||||
worldManager.removeWorld(worldName)
|
worldManager.removeWorld(world)
|
||||||
.onSuccess(removedWorldName -> {
|
.onSuccess(removedWorldName -> {
|
||||||
Logging.fine("World remove success: " + removedWorldName);
|
Logging.fine("World remove success: " + removedWorldName);
|
||||||
issuer.sendInfo(MVCorei18n.REMOVEWORLD_REMOVED, "{world}", removedWorldName);
|
issuer.sendInfo(MVCorei18n.REMOVEWORLD_REMOVED, "{world}", removedWorldName);
|
||||||
|
|
Loading…
Reference in New Issue