Skip to content

Commit

Permalink
chore: メッセージのフォーマットを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Oct 25, 2024
1 parent b6b05a1 commit c84569b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void sendMessageToMinecraft(Member discordMember, String discordMe
name_format = discordMember.getUser().getName() + " (" + discordMember.getNickname() + ")";
}

Bukkit.broadcast(Component.text("§a[Discord#" + name_format + "] " + "§f" + discordMessage));
Bukkit.broadcast(Component.text("§a[Discord] §r<" + name_format + "> " + discordMessage));
}


Expand All @@ -38,7 +38,7 @@ public static void sendMessageToDiscord(Player player, TextChannel discordChanne
Location location = player.getLocation();
String world_name = location.getWorld().getName();

discordChannel.sendMessage("[" + player.getName() + " | " + world_name + "]" + " " + message).queue();
discordChannel.sendMessage("[" + player.getName() + "@" + world_name + "]" + " " + message).queue();
}

public static void sendEventMessageToDiscord(TextChannel discordChannel, String message, int color) {
Expand All @@ -53,7 +53,7 @@ public static void sendJoinMessageToDiscord(Player player, TextChannel discordCh
EmbedBuilder embed = new EmbedBuilder();
embed.setTitle("入室");
embed.setDescription(player.getName() + " がログインしました");
embed.setThumbnail("https://mc-heads.net/avatar/" + player.getUniqueId() + "/100/nohelm.png");
embed.setThumbnail("https://mc-heads.net/head/" + player.getUniqueId());
embed.setColor(0x2AFF5C);

discordChannel.sendMessageEmbeds(embed.build()).queue();
Expand All @@ -63,7 +63,7 @@ public static void sendQuitMessageToDiscord(Player player, TextChannel discordCh
EmbedBuilder embed = new EmbedBuilder();
embed.setTitle("退出");
embed.setDescription(player.getName() + " がログアウトしました");
embed.setThumbnail("https://mc-heads.net/avatar/" + player.getUniqueId() + "/100/nohelm.png");
embed.setThumbnail("https://mc-heads.net/head/" + player.getUniqueId());
embed.setColor(0x687EFF);

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

0 comments on commit c84569b

Please sign in to comment.