class WorldType implements StringType<World> {

    @Override
    public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
        for (var world : Bukkit.getWorlds()) {
            if (world.getName().startsWith(builder.getRemaining())) {
                builder.suggest(world.getName().contains(" ") ? '"' + world.getName() + '"' : world.getName());
            }
        }
        
        return builder.buildFuture();
    }

}