Skip to content

Commit

Permalink
Fix AFK/Join/Leave Discord embed color not configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
frafol committed Jun 30, 2024
1 parent 42b3e27 commit 25e3dc8
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String label, @No
embed.setDescription(SpigotMessages.STAFF_DISCORD_AFK_ON_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(SpigotDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(SpigotDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down Expand Up @@ -241,7 +241,7 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String label, @No
embed.setDescription(SpigotMessages.STAFF_DISCORD_AFK_OFF_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(SpigotDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(SpigotDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void handle(@NotNull PlayerJoinEvent event) {
embed.setDescription(SpigotMessages.STAFF_DISCORD_JOIN_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(SpigotDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(SpigotDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down Expand Up @@ -253,7 +253,7 @@ public void handle(@NotNull PlayerQuitEvent event) {
embed.setDescription(SpigotMessages.STAFF_DISCORD_QUIT_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(SpigotDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(SpigotDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void onPlayerMove(@NotNull PlayerMoveEvent event) {
embed.setDescription(SpigotMessages.STAFF_DISCORD_AFK_OFF_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(SpigotDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(SpigotDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void execute(CommandSender sender, String[] args) {
embed.setDescription(BungeeMessages.STAFF_DISCORD_AFK_ON_MESSAGE_FORMAT.get(String.class)
.replace("%user%", sender.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(BungeeDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(BungeeDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down Expand Up @@ -294,7 +294,7 @@ public void execute(CommandSender sender, String[] args) {
embed.setDescription(BungeeMessages.STAFF_DISCORD_AFK_OFF_MESSAGE_FORMAT.get(String.class)
.replace("%user%", sender.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(BungeeDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(BungeeDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void handle(@NotNull ServerSwitchEvent event){
embed.setDescription(BungeeMessages.STAFF_DISCORD_JOIN_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(BungeeDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(BungeeDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down Expand Up @@ -403,7 +403,7 @@ public void handle(@NotNull PlayerDisconnectEvent event) {
embed.setDescription(BungeeMessages.STAFF_DISCORD_QUIT_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(BungeeDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(BungeeDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void Switch(@NotNull ServerSwitchEvent event) {
embed.setDescription(BungeeMessages.STAFF_DISCORD_AFK_OFF_MESSAGE_FORMAT.get(String.class)
.replace("%user%", event.getPlayer().getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(BungeeDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(BungeeDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down Expand Up @@ -356,7 +356,7 @@ public void Switch(@NotNull ServerSwitchEvent event) {
.replace("%server%", player.getServer().getInfo().getName())
.replace("%from%", event.getFrom().getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(BungeeDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(BungeeDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void execute(SimpleCommand.Invocation invocation) {
embed.setDescription(VelocityMessages.STAFF_DISCORD_AFK_ON_MESSAGE_FORMAT.get(String.class)
.replace("%user%", ((Player) commandSource).getUsername()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(VelocityDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(VelocityDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down Expand Up @@ -260,7 +260,7 @@ public void execute(SimpleCommand.Invocation invocation) {
embed.setDescription(VelocityMessages.STAFF_DISCORD_AFK_OFF_MESSAGE_FORMAT.get(String.class)
.replace("%user%", ((Player) commandSource).getUsername()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(VelocityDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(VelocityDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void handle(@NotNull ServerPostConnectEvent event) {
embed.setDescription(VelocityMessages.STAFF_DISCORD_JOIN_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getUsername()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(VelocityDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(VelocityDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down Expand Up @@ -314,7 +314,7 @@ public void handle(@NotNull DisconnectEvent event) {
embed.setDescription(VelocityMessages.STAFF_DISCORD_QUIT_MESSAGE_FORMAT.get(String.class)
.replace("%user%", player.getUsername()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(VelocityDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(VelocityDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void Switch(@NotNull ServerConnectedEvent event) {
embed.setDescription(VelocityMessages.STAFF_DISCORD_AFK_OFF_MESSAGE_FORMAT.get(String.class)
.replace("%user%", event.getPlayer().getUsername()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(VelocityDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(VelocityDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down Expand Up @@ -271,7 +271,7 @@ public void Switch(@NotNull ServerConnectedEvent event) {
.replace("%from%", event.getPreviousServer().get().getServerInfo().getName())
.replace("%server%", event.getServer().getServerInfo().getName()));

embed.setColor(Color.YELLOW);
embed.setColor(Color.getColor(VelocityDiscordConfig.EMBEDS_STAFFCHATCOLOR.get(String.class)));
embed.setFooter(VelocityDiscordConfig.EMBEDS_FOOTER.get(String.class), null);

channel.sendMessageEmbeds(embed.build()).queue();
Expand Down

0 comments on commit 25e3dc8

Please sign in to comment.