mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-29 22:23:59 +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")) {
|
if (command.startsWith("say")) {
|
||||||
cmd = "npc speak " + command.replaceFirst("say", "").trim() + " --target <p>";
|
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>")) {
|
&& !command.contains("--id <id>")) {
|
||||||
cmd += " --id <id>";
|
cmd += " --id <id>";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user