Add -s(ilent) flag to /npc create

This commit is contained in:
fullwall 2020-07-18 01:00:23 +08:00
parent 65aa07a09d
commit b571debec1

View File

@ -420,9 +420,9 @@ public class NPCCommands {
@Command(
aliases = { "npc" },
usage = "create [name] ((-b,u) --at [x:y:z:world] --type [type] --trait ['trait1, trait2...'] --b [behaviours])",
usage = "create [name] ((-b(aby),u(nspawned),s(ilent)) --at [x:y:z:world] --type [type] --trait ['trait1, trait2...'] --b [behaviours])",
desc = "Create a new NPC",
flags = "bu",
flags = "bus",
modifiers = { "create" },
min = 2,
permission = "citizens.npc.create")
@ -465,6 +465,9 @@ public class NPCCommands {
msg += " as a baby";
}
}
if (args.hasFlag('s')) {
npc.data().set(NPC.SILENT_METADATA, true);
}
// Initialize necessary traits
if (!Setting.SERVER_OWNS_NPCS.asBoolean()) {