mirror of
https://github.com/Freezy-Studios/BlazeSMP.git
synced 2025-04-22 04:44:04 +02:00
Security Patch
This commit is contained in:
parent
f208ed5937
commit
d258b22ca5
2 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
package me.freezy.plugins.papermc.blazesmp.command;
|
package me.freezy.plugins.papermc.blazesmp.command;
|
||||||
|
|
||||||
|
import me.freezy.plugins.papermc.blazesmp.BlazeSMP;
|
||||||
import me.freezy.plugins.papermc.blazesmp.command.util.SimpleCommand;
|
import me.freezy.plugins.papermc.blazesmp.command.util.SimpleCommand;
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
@ -85,7 +86,8 @@ public class ReportCommand extends SimpleCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @NotNull HttpURLConnection getHttpURLConnection(String jsonPayload) throws IOException {
|
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);
|
URL url = new URL(webhookUrl);
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
connection.setRequestMethod("POST");
|
connection.setRequestMethod("POST");
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
op-prefix: '<color:dark_gray>[</color><gradient:#ffa600:#ffb700><b>Team</b></gradient><color:dark_gray>]</color> '
|
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'
|
Loading…
Add table
Add a link
Reference in a new issue