@@ -0,0 +1,3046 @@
+package net.darkhax.bookshelf.impl.commands.args;%0A%0Aimport com.google.gson.JsonObject;%0Aimport com.mojang.brigadier.StringReader;%0Aimport com.mojang.brigadier.arguments.ArgumentType;%0Aimport com.mojang.brigadier.builder.RequiredArgumentBuilder;%0Aimport com.mojang.brigadier.context.CommandContext;%0Aimport com.mojang.brigadier.exceptions.CommandSyntaxException;%0Aimport com.mojang.brigadier.suggestion.Suggestions;%0Aimport com.mojang.brigadier.suggestion.SuggestionsBuilder;%0Aimport net.darkhax.bookshelf.api.Services;%0Aimport net.darkhax.bookshelf.api.util.TextHelper;%0Aimport net.minecraft.commands.CommandSourceStack;%0Aimport net.minecraft.commands.Commands;%0Aimport net.minecraft.commands.SharedSuggestionProvider;%0Aimport net.minecraft.commands.synchronization.ArgumentSerializer;%0Aimport net.minecraft.network.FriendlyByteBuf;%0Aimport net.minecraft.resources.ResourceLocation;%0A%0Aimport java.util.Collection;%0Aimport java.util.List;%0Aimport java.util.concurrent.CompletableFuture;%0Aimport java.util.stream.Collectors;%0A%0Apublic class FontArgument implements ArgumentType%3CResourceLocation%3E %7B%0A%0A    public static final ArgumentSerializer%3CFontArgument%3E SERIALIZER = new Serializer();%0A    public static final FontArgument ARGUMENT = new FontArgument();%0A%0A    private static final Collection%3CResourceLocation%3E VANILLA_FONTS = List.of(new ResourceLocation(%22fake_font%22), TextHelper.FONT_DEFAULT, TextHelper.FONT_ALT, TextHelper.FONT_UNIFORM, TextHelper.FONT_ILLAGER);%0A    private static final Collection%3CString%3E EXAMPLES = VANILLA_FONTS.stream().map(ResourceLocation::toString).collect(Collectors.toList());%0A%0A    public static ResourceLocation getFont(CommandContext%3CCommandSourceStack%3E context) %7B%0A%0A        return context.getArgument(%22font%22, ResourceLocation.class);%0A    %7D%0A%0A    public static RequiredArgumentBuilder%3CCommandSourceStack, ResourceLocation%3E argument() %7B%0A%0A        return Commands.argument(%22font%22, FontArgument.ARGUMENT);%0A    %7D%0A%0A    @Override%0A    public ResourceLocation parse(final StringReader reader) throws CommandSyntaxException %7B%0A%0A        return ResourceLocation.read(reader);%0A    %7D%0A%0A    @Override%0A    public Collection%3CString%3E getExamples() %7B%0A%0A        return EXAMPLES;%0A    %7D%0A%0A    @Override%0A    public %3CS%3E CompletableFuture%3CSuggestions%3E listSuggestions(CommandContext%3CS%3E context, SuggestionsBuilder builder) %7B%0A%0A        if (Services.PLATFORM.isPhysicalClient()) %7B%0A%0A            return SharedSuggestionProvider.suggestResource(TextHelper.getRegisteredFonts(), builder);%0A        %7D%0A%0A        return SharedSuggestionProvider.suggestResource(VANILLA_FONTS, builder);%0A    %7D%0A%0A    static class Serializer implements ArgumentSerializer%3CFontArgument%3E %7B%0A%0A        @Override%0A        public void serializeToNetwork(FontArgument fontArgument, FriendlyByteBuf friendlyByteBuf) %7B%0A%0A        %7D%0A%0A        @Override%0A        public FontArgument deserializeFromNetwork(FriendlyByteBuf friendlyByteBuf) %7B%0A%0A            return FontArgument.ARGUMENT;%0A        %7D%0A%0A        @Override%0A        public void serializeToJson(FontArgument fontArgument, JsonObject jsonObject) %7B%0A%0A        %7D%0A    %7D%0A%7D%0A

Add command argument for fonts installed on the client.