Match npc commands slightly more safely

This commit is contained in:
fullwall 2022-06-25 16:47:48 +08:00
parent 1cdeda5d5d
commit 659a5b17ad
1 changed files with 1 additions and 1 deletions

View File

@ -474,7 +474,7 @@ 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"))
if ((command.startsWith("npc ") || command.startsWith("waypoints ") || command.startsWith("wp "))
&& !command.contains("--id <id>")) {
cmd += " --id <id>";
}