This commit is contained in:
Brian Neumann-Fopiano
2026-08-19 22:21:25 -04:00
parent 41b2b53ac8
commit fec655def4
79 changed files with 425 additions and 1675 deletions
@@ -826,8 +826,13 @@ public class CommandIris implements DirectorExecutor {
public KList<String> getPossibilities() {
Set<String> options = new LinkedHashSet<>();
for (World world : Bukkit.getWorlds()) {
if (IrisToolbelt.isIrisWorld(world)) {
options.add(IrisWorldStorage.logicalName(world));
if (!IrisToolbelt.isIrisWorld(world)) {
continue;
}
options.add(IrisWorldStorage.logicalName(world));
String startupName = configuredStartupName(world);
if (startupName != null) {
options.add(startupName);
}
}
for (String identity : IrisWorlds.get().getWorlds().keySet()) {
@@ -850,6 +855,21 @@ public class CommandIris implements DirectorExecutor {
return new KList<>(options);
}
/**
* "iris worlds" prints the Bukkit startup name, so it has to be offered and accepted here too.
*/
private static String configuredStartupName(World world) {
try {
String configured = IrisWorldStorage.configuredWorldName(
WorldIdentity.key(world),
IrisWorldStorage.levelRoot().getName()
);
return configured.equals(world.getName()) ? configured : null;
} catch (RuntimeException failure) {
return null;
}
}
@Override
public String toString(String value) {
return value == null ? "" : value;