mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-27 03:28:45 +01:00
Match npc commands slightly more safely
This commit is contained in:
parent
1cdeda5d5d
commit
659a5b17ad
@ -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>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user