Fix say in /npc command

This commit is contained in:
fullwall 2022-06-30 16:10:16 +08:00
parent 58da8489e4
commit 55f8a1f75c

View File

@ -474,8 +474,8 @@ public class CommandTrait extends Trait {
if (command.startsWith("say")) {
cmd = "npc speak " + command.replaceFirst("say", "").trim() + " --target <p>";
}
if ((command.startsWith("npc ") || command.startsWith("waypoints ") || command.startsWith("wp "))
&& !command.contains("--id ")) {
if ((cmd.startsWith("npc ") || cmd.startsWith("waypoints ") || cmd.startsWith("wp "))
&& !cmd.contains("--id ")) {
cmd += " --id <id>";
}
String interpolatedCommand = Placeholders.replace(cmd, clicker, npc);