Skip to content

Commit

Permalink
Match npc commands slightly more safely
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jun 25, 2022
1 parent 1cdeda5 commit 659a5b1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ public void run(NPC npc, Player clicker) {
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>";
}
Expand Down

0 comments on commit 659a5b1

Please sign in to comment.