From d1e7800de3b06bd20099e8179316982a949e2736 Mon Sep 17 00:00:00 2001 From: rtm516 Date: Wed, 17 Jul 2024 17:42:05 +0100 Subject: [PATCH] Fix level command --- .../java/org/geysermc/discordbot/commands/LevelCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/geysermc/discordbot/commands/LevelCommand.java b/src/main/java/org/geysermc/discordbot/commands/LevelCommand.java index 9d584469..af5421d5 100644 --- a/src/main/java/org/geysermc/discordbot/commands/LevelCommand.java +++ b/src/main/java/org/geysermc/discordbot/commands/LevelCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022 GeyserMC. http://geysermc.org + * Copyright (c) 2020-2024 GeyserMC. http://geysermc.org * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,6 +35,7 @@ import net.dv8tion.jda.api.interactions.commands.build.OptionData; import net.dv8tion.jda.api.utils.FileUpload; import org.apache.batik.anim.dom.SAXSVGDocumentFactory; +import org.apache.batik.transcoder.SVGAbstractTranscoder; import org.apache.batik.transcoder.TranscoderException; import org.apache.batik.transcoder.TranscoderInput; import org.apache.batik.transcoder.TranscoderOutput; @@ -135,6 +136,7 @@ protected File handle(Member member) { // Convert the svg PNGTranscoder pngTranscoder = new PNGTranscoder(); + pngTranscoder.addTranscodingHint(SVGAbstractTranscoder.KEY_ALLOW_EXTERNAL_RESOURCES, Boolean.TRUE); pngTranscoder.transcode(transcoderInput, transcoderOutput); // Close the output stream