Security Patch

This commit is contained in:
DaTTV 2025-02-17 21:07:27 +01:00
parent f208ed5937
commit d258b22ca5
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,6 @@
package me.freezy.plugins.papermc.blazesmp.command;
import me.freezy.plugins.papermc.blazesmp.BlazeSMP;
import me.freezy.plugins.papermc.blazesmp.command.util.SimpleCommand;
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.bukkit.Bukkit;
@ -85,7 +86,8 @@ public class ReportCommand extends SimpleCommand {
}
private static @NotNull HttpURLConnection getHttpURLConnection(String jsonPayload) throws IOException {
String webhookUrl = "https://discord.com/api/webhooks/1341116066067124306/9A0wtk8zFWZwoQZFzSpP4derV2Sv92flq28aiYGIWLOUR2h6tslWH1_RLMWCjLDjBQK1";
String webhookUrl = BlazeSMP.getInstance().getConfig().getString("discord-report-webhook");
assert webhookUrl != null;
URL url = new URL(webhookUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");

View file

@ -1,2 +1,3 @@
op-prefix: '<color:dark_gray>[</color><gradient:#ffa600:#ffb700><b>Team</b></gradient><color:dark_gray>]</color> '
player-prefix: '<color:dark_gray>[</color><gradient:#747e80:#828d8f><b>Player</b></gradient><color:dark_gray>]</color> '
player-prefix: '<color:dark_gray>[</color><gradient:#747e80:#828d8f><b>Player</b></gradient><color:dark_gray>]</color> '
discord-report-webhook: 'https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz'