diff --git a/src/main/java/timongcraft/system/commands/MeCommand.java b/src/main/java/timongcraft/system/commands/MeCommand.java index fd4581a..d161bb1 100644 --- a/src/main/java/timongcraft/system/commands/MeCommand.java +++ b/src/main/java/timongcraft/system/commands/MeCommand.java @@ -5,6 +5,7 @@ import dev.jorel.commandapi.CommandTree; import dev.jorel.commandapi.arguments.GreedyStringArgument; import dev.jorel.commandapi.executors.CommandArguments; +import net.md_5.bungee.api.chat.TranslatableComponent; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; @@ -23,9 +24,7 @@ public static void register() { } private static void meManager(CommandSender sender, CommandArguments args) { - String msg = (String) args.get("message"); - - Bukkit.broadcastMessage("* " + sender.getName() + " " + msg); + Bukkit.spigot().broadcast(new TranslatableComponent("chat.type.emote", sender.getName(), args.get("message"))); } } diff --git a/src/main/java/timongcraft/system/commands/SayCommand.java b/src/main/java/timongcraft/system/commands/SayCommand.java index 3636cdf..dbcb061 100644 --- a/src/main/java/timongcraft/system/commands/SayCommand.java +++ b/src/main/java/timongcraft/system/commands/SayCommand.java @@ -24,9 +24,7 @@ public static void register() { } private static void sayManager(CommandSender sender, CommandArguments args) { - TranslatableComponent message = new TranslatableComponent("chat.type.announcement", sender.getName(), args.get("message")); - - Bukkit.spigot().broadcast(message); + Bukkit.spigot().broadcast(new TranslatableComponent("chat.type.announcement", sender.getName(), args.get("message"))); } } \ No newline at end of file