This commit is contained in:
loki5512344 2026-03-11 14:35:00 +01:00
parent 5ece2192a2
commit 6b6605a2b0
6 changed files with 212 additions and 160 deletions

View file

@ -8,6 +8,7 @@ import org.bukkit.plugin.java.JavaPlugin;
import java.io.IOException;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.CompletableFuture;
@ -141,7 +142,7 @@ public class DiscordWebhook {
* Синхронная отправка в вебхук
*/
private boolean sendWebhookSync(String jsonPayload) throws IOException {
URL url = new URL(webhookUrl);
URL url = URI.create(webhookUrl).toURL();
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
try {