Add confirmation message, change color, fix author icon url

This commit is contained in:
Teriuihi 2022-02-20 19:12:20 +01:00
parent 8d6efe0265
commit a0c626a88f
2 changed files with 5 additions and 3 deletions

View File

@ -411,6 +411,7 @@ public final class Config {
}
public static HashMap<String, Long> serverChannelId = new HashMap<>();
public static String REPORT_SENT = "<green>Your report was sent, staff will contact you asap to help resolve your issue!</green>";
private static void loadChannelIds() {
serverChannelId.clear();
serverChannelId.put("general", getLong("discord-channel-id.general", (long) -1));
@ -424,5 +425,6 @@ public final class Config {
long channelId = configurationNode.getLong();
serverChannelId.put(key.toLowerCase(), channelId);
}
REPORT_SENT = getString("messages.report-sent", REPORT_SENT);
}
}

View File

@ -46,10 +46,9 @@ public class Report {
String serverName = serverConnection.getServer().getServerInfo().getName();
EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder.setAuthor(player.getUsername(),
"https://crafatar.com/avatars/" + player.getUniqueId() + "?overlay");
embedBuilder.setAuthor(player.getUsername(), null, "https://crafatar.com/avatars/" + player.getUniqueId() + "?overlay");
embedBuilder.setTitle("Player Report");
embedBuilder.setColor(Color.BLUE);
embedBuilder.setColor(Color.CYAN);
embedBuilder.addField("Incident",
context.getArgument("report", String.class),
false);
@ -61,6 +60,7 @@ public class Report {
if (id <= 0)
id = Config.serverChannelId.get("general");
DiscordLink.getPlugin().getBot().sendEmbedToDiscord(id, embedBuilder, -1);
player.sendMessage(Utility.parseMiniMessage(Config.REPORT_SENT));
return 1;
})
)