lumihomecommands: type: world debug: true events: on lumihome command: - inject locally path:lumihomecommandhandler on lh command: - inject locally path:lumihomecommandhandler lumihomecommandhandler: - determine fulfilled passively - if == add inject locally path:lumihomeadd - if == delete inject locally path:lumihomedelete - if == remove inject locally path:lumihomedelete - if == list inject locally path:lumihomelist - if == help inject locally path:lumihomehelp - if == teleport inject locally path:lumihomeinitiateteleport - if ]> contains inject locally path:lumihomeinitiateteleport lumihomeadd: - if { - if == empty { - narrate "<&c>Please specify a name for your home!" - queue clear } - inject locally path:lumihomeaddinitiate } else if { - if ].size> < 5 { - if == empty { - narrate "<&c>Please specify a name for your home!" - queue clear } - inject locally path:lumihomeaddinitiate } else { - narrate "<&c>You can't have more than 5 homes as a guest!" } } else { - narrate "<&c>You do not have the permission to do this!" } lumihomeaddinitiate: - if ]> !contains { - narrate "<&6>You added a home." - yaml id:lumihomesaves set lumihomes...location: } else { - narrate "<&c>You already have a home with this name!" } lumihomedelete: - if { - if == empty { - narrate "<&c>Please specify a name for your home!" - queue clear } - if ]> contains { - narrate "<&6>You deleted a home." - yaml id:lumihomesaves set lumihomes.TheBlackCoyote.:! } else { - narrate "<&c>You don't have a home with this name yet!" } } else { - narrate "<&c>You do not have the permission to do this!" } lumihomelist: - if { - narrate "<&6>Your homes: ].formatted||none>." } lumihomehelp: - narrate "notyetpls" lumihomeinitiateteleport: - if { - if == teleport { - define destination } else { - define destination } - inject locally path:lumihometeleport } else { - narrate "<&c>You do not have the permission to do this." } lumihometeleport: - if == empty { - narrate "<&c>Please specify a valid home to teleport to!" - queue clear } - narrate "<&6>You teleported to your %destination% home." - teleport .%destination%.location]>