Search in sources :

Example 1 with ResourceDownloadManager

use of com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager in project InteractiveChat-DiscordSRV-Addon by LOOHP.

the class CMLMain method downloadAssets.

protected static void downloadAssets() throws IOException {
    File defaultAssetsFolder = new File("InteractiveChatDiscordSrvAddon/built-in", "Default");
    defaultAssetsFolder.mkdirs();
    System.out.println("Available Minecraft Versions:");
    for (String version : ResourceDownloadManager.getMinecraftVersions()) {
        System.out.println(version);
    }
    System.out.println();
    System.out.println("Select Minecraft Version: (Type the version string)");
    String input;
    while (true) {
        input = IN.readLine();
        if (ResourceDownloadManager.getMinecraftVersions().contains(input)) {
            break;
        }
        System.out.println("That is not a valid Minecraft version!");
        System.out.println();
    }
    ResourceDownloadManager downloadManager = new ResourceDownloadManager(input, defaultAssetsFolder);
    CompletableFuture<Void> future = new CompletableFuture<>();
    new Thread(() -> {
        downloadManager.downloadResources((type, fileName, percentage) -> {
            switch(type) {
                case CLIENT_DOWNLOAD:
                    System.out.println("Downloading client jar");
                    break;
                case EXTRACT:
                    System.out.println("Extracting " + fileName);
                    break;
                case DOWNLOAD:
                    System.out.println("Downloading " + fileName);
                    break;
                case DONE:
                    System.out.println("Done!");
                    break;
            }
        });
        future.complete(null);
    }).start();
    future.join();
    System.out.println("Assets saved at: " + defaultAssetsFolder.getAbsolutePath());
}
Also used : YamlConfiguration(com.loohp.interactivechat.libs.com.loohp.yamlconfiguration.YamlConfiguration) Version(com.loohp.interactivechat.updater.Version) Enumeration(java.util.Enumeration) URL(java.net.URL) Registry(com.loohp.interactivechat.registry.Registry) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) CompletableFuture(java.util.concurrent.CompletableFuture) FileInputStream(java.io.FileInputStream) InputStreamReader(java.io.InputStreamReader) File(java.io.File) FileUtils(com.loohp.interactivechat.utils.FileUtils) LinkedHashMap(java.util.LinkedHashMap) List(java.util.List) ResourceDownloadManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager) HTTPRequestUtils(com.loohp.interactivechat.utils.HTTPRequestUtils) Map(java.util.Map) InteractiveChatRegistry(com.loohp.interactivechatdiscordsrvaddon.registry.InteractiveChatRegistry) Entry(java.util.Map.Entry) ConfigurationSection(com.loohp.interactivechat.libs.com.loohp.yamlconfiguration.ConfigurationSection) BufferedReader(java.io.BufferedReader) LinkedList(java.util.LinkedList) JSONObject(com.loohp.interactivechat.libs.org.json.simple.JSONObject) CompletableFuture(java.util.concurrent.CompletableFuture) ResourceDownloadManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager) File(java.io.File)

Example 2 with ResourceDownloadManager

use of com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager in project InteractiveChat-DiscordSRV-Addon by LOOHP.

the class AssetsDownloader method loadExtras.

public static void loadExtras() {
    ResourceDownloadManager downloadManager = new ResourceDownloadManager(InteractiveChat.exactMinecraftVersion, null);
    downloadManager.downloadExtras(() -> {
        InteractiveChatDiscordSrvAddon.plugin.extras.clear();
    }, (key, dataBytes) -> {
        InteractiveChatDiscordSrvAddon.plugin.extras.put(key, dataBytes);
    });
}
Also used : ResourceDownloadManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager)

Example 3 with ResourceDownloadManager

use of com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager in project InteractiveChat-DiscordSRV-Addon by LOOHP.

the class AssetsDownloader method loadAssets.

@SuppressWarnings("deprecation")
public static void loadAssets(File rootFolder, boolean force, boolean clean, CommandSender... senders) throws Exception {
    if (!Arrays.asList(senders).contains(Bukkit.getConsoleSender())) {
        List<CommandSender> senderList = new ArrayList<>(Arrays.asList(senders));
        senderList.add(Bukkit.getConsoleSender());
        senders = senderList.toArray(new CommandSender[senderList.size()]);
    }
    if (!LOCK.tryLock(0, TimeUnit.MILLISECONDS)) {
        return;
    }
    try {
        File hashes = new File(rootFolder, "hashes.json");
        if (!hashes.exists()) {
            try (PrintWriter pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream(hashes), StandardCharsets.UTF_8))) {
                pw.println("{}");
                pw.flush();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        JSONObject json;
        try (InputStreamReader hashReader = new InputStreamReader(new FileInputStream(hashes), StandardCharsets.UTF_8)) {
            json = (JSONObject) new JSONParser().parse(hashReader);
        } catch (Throwable e) {
            new RuntimeException("Invalid hashes.json! It will be reset.", e).printStackTrace();
            json = new JSONObject();
        }
        String oldHash = InteractiveChatDiscordSrvAddon.plugin.defaultResourceHash = json.containsKey("Default") ? json.get("Default").toString() : "EMPTY";
        String oldVersion = json.containsKey("version") ? json.get("version").toString() : "EMPTY";
        File defaultAssetsFolder = new File(rootFolder + "/built-in", "Default");
        defaultAssetsFolder.mkdirs();
        ResourceDownloadManager downloadManager = new ResourceDownloadManager(InteractiveChat.exactMinecraftVersion, defaultAssetsFolder);
        String hash = downloadManager.getHash();
        if (force || !hash.equals(oldHash) || !InteractiveChatDiscordSrvAddon.plugin.getDescription().getVersion().equals(oldVersion)) {
            if (clean) {
                InteractiveChatDiscordSrvAddon.plugin.sendMessage(ChatColor.AQUA + "[ICDiscordSrvAddon] Cleaning old default resources!", senders);
                FileUtils.removeFolderRecursively(defaultAssetsFolder);
                defaultAssetsFolder.mkdirs();
            }
            if (force) {
                InteractiveChatDiscordSrvAddon.plugin.sendMessage(ChatColor.AQUA + "[ICDiscordSrvAddon] Forcibly re-downloading default resources! Please wait... (" + oldHash + " -> " + hash + ")", senders);
            } else if (!hash.equals(oldHash)) {
                InteractiveChatDiscordSrvAddon.plugin.sendMessage(ChatColor.AQUA + "[ICDiscordSrvAddon] Hash changed! Re-downloading default resources! Please wait... (" + oldHash + " -> " + hash + ")", senders);
            } else {
                InteractiveChatDiscordSrvAddon.plugin.sendMessage(ChatColor.AQUA + "[ICDiscordSrvAddon] Plugin version changed! Re-downloading default resources! Please wait... (" + oldHash + " -> " + hash + ")", senders);
            }
            downloadManager.downloadResources((type, fileName, percentage) -> {
                switch(type) {
                    case CLIENT_DOWNLOAD:
                        if (!InteractiveChatDiscordSrvAddon.plugin.reducedAssetsDownloadInfo) {
                            Bukkit.getConsoleSender().sendMessage(ChatColor.GRAY + "[ICDiscordSrvAddon] Downloading client jar");
                        }
                        break;
                    case EXTRACT:
                        if (!InteractiveChatDiscordSrvAddon.plugin.reducedAssetsDownloadInfo) {
                            Bukkit.getConsoleSender().sendMessage(ChatColor.GRAY + "[ICDiscordSrvAddon] Extracting " + fileName);
                        }
                        break;
                    case DOWNLOAD:
                        if (!InteractiveChatDiscordSrvAddon.plugin.reducedAssetsDownloadInfo) {
                            Bukkit.getConsoleSender().sendMessage(ChatColor.GRAY + "[ICDiscordSrvAddon] Downloading " + fileName + " (" + FORMAT.format(percentage) + "%)");
                        }
                        break;
                    case DONE:
                        Bukkit.getConsoleSender().sendMessage(ChatColor.AQUA + "[ICDiscordSrvAddon] Done!");
                        break;
                }
            });
        }
        downloadManager.downloadExtras(() -> {
            InteractiveChatDiscordSrvAddon.plugin.extras.clear();
        }, (key, dataBytes) -> {
            InteractiveChatDiscordSrvAddon.plugin.extras.put(key, dataBytes);
        });
        InteractiveChatDiscordSrvAddon.plugin.defaultResourceHash = hash;
        json.put("Default", hash);
        json.put("version", InteractiveChatDiscordSrvAddon.plugin.getDescription().getVersion());
        try (PrintWriter pw = new PrintWriter(new OutputStreamWriter(new FileOutputStream(hashes), StandardCharsets.UTF_8))) {
            Gson g = new GsonBuilder().setPrettyPrinting().create();
            pw.println(g.toJson(new JsonParser().parse(json.toString())));
            pw.flush();
        } catch (Exception e) {
            e.printStackTrace();
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    LOCK.unlock();
}
Also used : InputStreamReader(java.io.InputStreamReader) GsonBuilder(com.google.gson.GsonBuilder) ArrayList(java.util.ArrayList) Gson(com.google.gson.Gson) FileInputStream(java.io.FileInputStream) JSONObject(com.loohp.interactivechat.libs.org.json.simple.JSONObject) ResourceDownloadManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager) FileOutputStream(java.io.FileOutputStream) CommandSender(org.bukkit.command.CommandSender) OutputStreamWriter(java.io.OutputStreamWriter) JSONParser(com.loohp.interactivechat.libs.org.json.simple.parser.JSONParser) File(java.io.File) PrintWriter(java.io.PrintWriter) JsonParser(com.google.gson.JsonParser)

Example 4 with ResourceDownloadManager

use of com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager in project InteractiveChat-DiscordSRV-Addon by LOOHP.

the class GUIMain method downloadAssets.

protected static void downloadAssets(String title, BufferedImage image, Icon icon) {
    File defaultAssetsFolder = new File("InteractiveChatDiscordSrvAddon/built-in", "Default");
    defaultAssetsFolder.mkdirs();
    File libsFolder = new File("InteractiveChatDiscordSrvAddon", "libs");
    libsFolder.mkdirs();
    JPanel panel = new JPanel();
    panel.add(GUIMain.createLabel("Select Minecraft Version: ", 13));
    JComboBox<String> options = new JComboBox<>();
    for (String version : ResourceDownloadManager.getMinecraftVersions()) {
        options.addItem(version);
    }
    panel.add(options);
    int result = JOptionPane.showOptionDialog(null, panel, title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, icon, null, null);
    if (result < 0) {
        return;
    }
    ResourceDownloadManager resourceDownloadManager = new ResourceDownloadManager((String) options.getSelectedItem(), defaultAssetsFolder);
    LibraryDownloadManager libraryDownloadManager = new LibraryDownloadManager(libsFolder);
    JFrame frame = new JFrame(title);
    frame.setIconImage(image);
    frame.setSize(800, 175);
    frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    frame.setLocationRelativeTo(null);
    panel = new JPanel();
    panel.setBorder(BorderFactory.createEmptyBorder(30, 30, 30, 30));
    panel.setLayout(new GridLayout(0, 1));
    JLabel label = GUIMain.createLabel("<html>Downloading Assets:<html/>", 13);
    label.setSize(800, 125);
    panel.add(label);
    JProgressBar progressBar = new JProgressBar(0, 10000);
    panel.add(progressBar);
    frame.add(panel, BorderLayout.CENTER);
    frame.setResizable(false);
    frame.setVisible(true);
    CompletableFuture<Void> future = new CompletableFuture<>();
    new Thread(() -> {
        resourceDownloadManager.downloadResources((type, fileName, percentage) -> {
            switch(type) {
                case CLIENT_DOWNLOAD:
                    label.setText("<html>Downloading Assets:<br>Downloading client jar<html/>");
                    break;
                case EXTRACT:
                    label.setText("<html>Downloading Assets:<br>Extracting " + fileName + "<html/>");
                    break;
                case DOWNLOAD:
                    label.setText("<html>Downloading Assets:<br>Downloading " + fileName + "<html/>");
                    progressBar.setValue(Math.min(9999, (int) (percentage * 100)));
                    break;
                case DONE:
                    label.setText("<html>Done!<html/>");
                    break;
            }
        });
        libraryDownloadManager.downloadLibraries((downloadResult, jarName) -> {
            if (downloadResult) {
                label.setText("<html>Downloaded library \"" + jarName + "\"<html/>");
            }
        });
        future.complete(null);
    }).start();
    future.join();
    progressBar.setValue(9999);
    JOptionPane.showMessageDialog(null, createLabel("Assets saved at: " + defaultAssetsFolder.getAbsolutePath(), 15), title, JOptionPane.INFORMATION_MESSAGE, icon);
    frame.setVisible(false);
    frame.dispose();
}
Also used : Color(java.awt.Color) UIManager(javax.swing.UIManager) YamlConfiguration(com.loohp.interactivechat.libs.com.loohp.yamlconfiguration.YamlConfiguration) Version(com.loohp.interactivechat.updater.Version) Enumeration(java.util.Enumeration) URL(java.net.URL) Registry(com.loohp.interactivechat.registry.Registry) URISyntaxException(java.net.URISyntaxException) RenderingHints(java.awt.RenderingHints) CompletableFuture(java.util.concurrent.CompletableFuture) SwingConstants(javax.swing.SwingConstants) FileUtils(com.loohp.interactivechat.utils.FileUtils) GridLayout(java.awt.GridLayout) LinkedHashMap(java.util.LinkedHashMap) ResourceDownloadManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager) Graphics2D(java.awt.Graphics2D) Map(java.util.Map) InteractiveChatRegistry(com.loohp.interactivechatdiscordsrvaddon.registry.InteractiveChatRegistry) ImageIO(javax.imageio.ImageIO) ImageIcon(javax.swing.ImageIcon) URI(java.net.URI) JComboBox(javax.swing.JComboBox) JFrame(javax.swing.JFrame) BorderLayout(java.awt.BorderLayout) LinkedList(java.util.LinkedList) JSONObject(com.loohp.interactivechat.libs.org.json.simple.JSONObject) JProgressBar(javax.swing.JProgressBar) PrintWriter(java.io.PrintWriter) Desktop(java.awt.Desktop) BufferedImage(java.awt.image.BufferedImage) Font(java.awt.Font) StringWriter(java.io.StringWriter) DecimalFormat(java.text.DecimalFormat) BorderFactory(javax.swing.BorderFactory) Icon(javax.swing.Icon) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) JOptionPane(javax.swing.JOptionPane) File(java.io.File) List(java.util.List) HTTPRequestUtils(com.loohp.interactivechat.utils.HTTPRequestUtils) JLabel(javax.swing.JLabel) LibraryDownloadManager(com.loohp.interactivechatdiscordsrvaddon.libs.LibraryDownloadManager) Entry(java.util.Map.Entry) ConfigurationSection(com.loohp.interactivechat.libs.com.loohp.yamlconfiguration.ConfigurationSection) JPanel(javax.swing.JPanel) WindowConstants(javax.swing.WindowConstants) Toolkit(java.awt.Toolkit) JPanel(javax.swing.JPanel) LibraryDownloadManager(com.loohp.interactivechatdiscordsrvaddon.libs.LibraryDownloadManager) JComboBox(javax.swing.JComboBox) JProgressBar(javax.swing.JProgressBar) JLabel(javax.swing.JLabel) GridLayout(java.awt.GridLayout) CompletableFuture(java.util.concurrent.CompletableFuture) ResourceDownloadManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager) JFrame(javax.swing.JFrame) File(java.io.File)

Example 5 with ResourceDownloadManager

use of com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager in project InteractiveChat-DiscordSRV-Addon by LOOHP.

the class MinecraftFontRenderer method downloadAllLanguages.

protected void downloadAllLanguages(String title, BufferedImage image, Icon icon) {
    File defaultAssetsFolder = new File("InteractiveChatDiscordSrvAddon/built-in", "Default");
    defaultAssetsFolder.mkdirs();
    JPanel panel = new JPanel();
    panel.add(GUIMain.createLabel("Select Minecraft Version: ", 13));
    JComboBox<String> options = new JComboBox<>();
    for (String version : ResourceDownloadManager.getMinecraftVersions()) {
        options.addItem(version);
    }
    panel.add(options);
    int result = JOptionPane.showOptionDialog(null, panel, title, JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, icon, null, null);
    if (result < 0) {
        return;
    }
    ResourceDownloadManager downloadManager = new ResourceDownloadManager((String) options.getSelectedItem(), defaultAssetsFolder);
    JFrame frame = new JFrame(title);
    frame.setIconImage(image);
    frame.setSize(800, 175);
    frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    frame.setLocationRelativeTo(null);
    panel = new JPanel();
    panel.setBorder(BorderFactory.createEmptyBorder(30, 30, 30, 30));
    panel.setLayout(new GridLayout(0, 1));
    JLabel label = GUIMain.createLabel("<html>Downloading Assets:<html/>", 13);
    label.setSize(800, 125);
    panel.add(label);
    JProgressBar progressBar = new JProgressBar(0, 10000);
    panel.add(progressBar);
    frame.add(panel, BorderLayout.CENTER);
    frame.setResizable(false);
    frame.setVisible(true);
    CompletableFuture<Void> future = new CompletableFuture<>();
    new Thread(() -> {
        downloadManager.downloadLanguages((type, fileName, percentage) -> {
            switch(type) {
                case DOWNLOAD:
                    label.setText("<html>Downloading Assets:<br>Downloading " + fileName + "<html/>");
                    progressBar.setValue(Math.min(9999, (int) (percentage * 100)));
                    break;
                case DONE:
                    label.setText("<html>Done!<html/>");
                    break;
            }
        });
        future.complete(null);
    }).start();
    future.join();
    progressBar.setValue(9999);
    JOptionPane.showMessageDialog(null, GUIMain.createLabel("Assets saved at: " + defaultAssetsFolder.getAbsolutePath(), 15), title, JOptionPane.INFORMATION_MESSAGE, icon);
    frame.setVisible(false);
    frame.dispose();
}
Also used : Color(java.awt.Color) YamlConfiguration(com.loohp.interactivechat.libs.com.loohp.yamlconfiguration.YamlConfiguration) URLClassLoaderAccess(com.loohp.interactivechatdiscordsrvaddon.libs.URLClassLoaderAccess) ResourcePackInfo(com.loohp.interactivechatdiscordsrvaddon.resources.ResourcePackInfo) RenderingHints(java.awt.RenderingHints) TextureAnimation(com.loohp.interactivechatdiscordsrvaddon.resources.textures.TextureAnimation) URLClassLoader(java.net.URLClassLoader) ImageIO(javax.imageio.ImageIO) MouseAdapter(java.awt.event.MouseAdapter) TextureResource(com.loohp.interactivechatdiscordsrvaddon.resources.textures.TextureResource) JFileChooser(javax.swing.JFileChooser) JComboBox(javax.swing.JComboBox) JFrame(javax.swing.JFrame) BorderLayout(java.awt.BorderLayout) Clipboard(java.awt.datatransfer.Clipboard) PrintWriter(java.io.PrintWriter) BufferedImage(java.awt.image.BufferedImage) BorderFactory(javax.swing.BorderFactory) Icon(javax.swing.Icon) LanguageManager(com.loohp.interactivechatdiscordsrvaddon.resources.languages.LanguageManager) ComponentEvent(java.awt.event.ComponentEvent) KeyEvent(java.awt.event.KeyEvent) Collectors(java.util.stream.Collectors) Executors(java.util.concurrent.Executors) Objects(java.util.Objects) Dimension(java.awt.Dimension) List(java.util.List) GridConstraints(com.loohp.interactivechat.libs.com.intellij.uiDesigner.core.GridConstraints) JCheckBox(javax.swing.JCheckBox) Graphics(java.awt.Graphics) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) JPanel(javax.swing.JPanel) WindowConstants(javax.swing.WindowConstants) Toolkit(java.awt.Toolkit) Insets(java.awt.Insets) ImageUtils(com.loohp.interactivechatdiscordsrvaddon.graphics.ImageUtils) ByteArrayOutputStream(java.io.ByteArrayOutputStream) JTextField(javax.swing.JTextField) ResourceManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceManager) SpinnerNumberModel(javax.swing.SpinnerNumberModel) CompletableFuture(java.util.concurrent.CompletableFuture) KeyAdapter(java.awt.event.KeyAdapter) AtomicReference(java.util.concurrent.atomic.AtomicReference) ComponentStyling(com.loohp.interactivechat.utils.ComponentStyling) ArrayList(java.util.ArrayList) GridLayout(java.awt.GridLayout) SwingUtilities(javax.swing.SwingUtilities) FocusAdapter(java.awt.event.FocusAdapter) ResourceDownloadManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager) PlainTextComponentSerializer(com.loohp.interactivechat.libs.net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer) JMenuItem(javax.swing.JMenuItem) Graphics2D(java.awt.Graphics2D) JProgressBar(javax.swing.JProgressBar) ExecutorService(java.util.concurrent.ExecutorService) GsonComponentSerializer(com.loohp.interactivechat.libs.net.kyori.adventure.text.serializer.gson.GsonComponentSerializer) JComponent(javax.swing.JComponent) PrintStream(java.io.PrintStream) JButton(javax.swing.JButton) JSpinner(javax.swing.JSpinner) ReentrantLock(java.util.concurrent.locks.ReentrantLock) Component(com.loohp.interactivechat.libs.net.kyori.adventure.text.Component) ResourceRegistry(com.loohp.interactivechatdiscordsrvaddon.registry.ResourceRegistry) JPopupMenu(javax.swing.JPopupMenu) StringWriter(java.io.StringWriter) Spacer(com.loohp.interactivechat.libs.com.intellij.uiDesigner.core.Spacer) TextureMeta(com.loohp.interactivechatdiscordsrvaddon.resources.textures.TextureMeta) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) JOptionPane(javax.swing.JOptionPane) MouseEvent(java.awt.event.MouseEvent) File(java.io.File) JScrollPane(javax.swing.JScrollPane) ComponentAdapter(java.awt.event.ComponentAdapter) TimeUnit(java.util.concurrent.TimeUnit) GridLayoutManager(com.loohp.interactivechat.libs.com.intellij.uiDesigner.core.GridLayoutManager) JLabel(javax.swing.JLabel) FocusEvent(java.awt.event.FocusEvent) ForkJoinPool(java.util.concurrent.ForkJoinPool) ChatColorUtils(com.loohp.interactivechat.utils.ChatColorUtils) TextureProperties(com.loohp.interactivechatdiscordsrvaddon.resources.textures.TextureProperties) JTextArea(javax.swing.JTextArea) NamedTextColor(com.loohp.interactivechat.libs.net.kyori.adventure.text.format.NamedTextColor) Collections(java.util.Collections) LegacyComponentSerializer(com.loohp.interactivechat.libs.net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer) JPanel(javax.swing.JPanel) JComboBox(javax.swing.JComboBox) JProgressBar(javax.swing.JProgressBar) JLabel(javax.swing.JLabel) GridLayout(java.awt.GridLayout) CompletableFuture(java.util.concurrent.CompletableFuture) ResourceDownloadManager(com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager) JFrame(javax.swing.JFrame) File(java.io.File)

Aggregations

ResourceDownloadManager (com.loohp.interactivechatdiscordsrvaddon.resources.ResourceDownloadManager)5 File (java.io.File)4 FileInputStream (java.io.FileInputStream)4 YamlConfiguration (com.loohp.interactivechat.libs.com.loohp.yamlconfiguration.YamlConfiguration)3 JSONObject (com.loohp.interactivechat.libs.org.json.simple.JSONObject)3 IOException (java.io.IOException)3 PrintWriter (java.io.PrintWriter)3 List (java.util.List)3 CompletableFuture (java.util.concurrent.CompletableFuture)3 ConfigurationSection (com.loohp.interactivechat.libs.com.loohp.yamlconfiguration.ConfigurationSection)2 BorderLayout (java.awt.BorderLayout)2 Color (java.awt.Color)2 Graphics2D (java.awt.Graphics2D)2 GridLayout (java.awt.GridLayout)2 RenderingHints (java.awt.RenderingHints)2 Toolkit (java.awt.Toolkit)2 BufferedImage (java.awt.image.BufferedImage)2 StringWriter (java.io.StringWriter)2 ArrayList (java.util.ArrayList)2 ImageIO (javax.imageio.ImageIO)2