diff --git a/src/main/java/dev/foxikle/customnpcs/commands/NPCActionCommand.java b/src/main/java/dev/foxikle/customnpcs/commands/NPCActionCommand.java index d2611912..3137c184 100644 --- a/src/main/java/dev/foxikle/customnpcs/commands/NPCActionCommand.java +++ b/src/main/java/dev/foxikle/customnpcs/commands/NPCActionCommand.java @@ -66,7 +66,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St } case "SEND_MESSAGE" -> { if (args.size() >= 1) { - player.sendMessage(ChatColor.translateAlternateColorCodes('&', args.toString())); + player.sendMessage(ChatColor.translateAlternateColorCodes('&', String.join(" ", args))); } } case "PLAY_SOUND" -> { @@ -80,7 +80,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St } } case "RUN_COMMAND" -> player.performCommand(args.toString()); - case "ACTION_BAR" -> player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new ComponentBuilder(net.md_5.bungee.api.ChatColor.translateAlternateColorCodes('&', args.toString())).create()); + case "ACTION_BAR" -> player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new ComponentBuilder(net.md_5.bungee.api.ChatColor.translateAlternateColorCodes('&', String.join(" ", args))).create()); case "TELEPORT" -> { if(args.size() >= 5) { double x = Double.parseDouble(args.get(0));