# SHIPS PLUGIN 22099 17 -237721#
SHIPS_COMMAND:
type: command
name: ships
script:
- choose "<context.args.get[1]>":
- case "spawn":
- - if <yaml[ships].contains[<context.args.get[2]>]> {
- - foreach <yaml[ships].list_keys[<context.args.get[2]>]> {
- - spawn armor_stand[gravity=false;marker=true;equipment=<yaml[ships].read[<def[value]>.material].as_item>|air|air|air;armor_pose=head|<yaml[ships].read[<def[value]>.rotation]>] <player.location.add[<yaml[ships].read[<def[value]>.location].as_location>]>
+ - define ship <context.args.get[2]>
+ - if <yaml[ships].contains[<def[ship]>]> {
+ - foreach <yaml[ships].list_keys[<def[ship]>]> {
+ - spawn armor_stand[gravity=false;marker=true;equipment=<yaml[ships].read[<def[ship]>.<def[value]>.material].as_item>|air|air|air;armor_pose=head|<yaml[ships].read[<def[ship]>.<def[value]>.rotation]>] <player.location.add[<yaml[ships].read[<def[ship]>.<def[value]>.location].as_location>]>
}
}
else {
- - narrate "<&c>There is no ship of that name!"
+ - narrate "<&c>There is no ship of name <def[ship]>!"
}