Messaging Commands:
type: world
events:
on msg command:
- ^inject messagesend
on tell command:
- ^inject messagesend
on m command:
- ^inject messagesend
on reply command:
- ^if <c.args.get[1]> == null {
- ^narrate '<&f>Message not sent, no message.'
- determine fulfilled
- queue clear
}
- ^narrate '<&e><player.name><&r> > <&6>Me <&r><&co> <context.args.get[1].to[<context.args.size>].as_string>' t:<player.flag[lastplayermessaged].as_player>
- ^narrate '<&e>Me<&r> > <&6><player.flag[lastplayermessaged].as_player.name> <&r><&co> <context.args.get[1].to[<context.args.size>].as_string>' t:<player>
- ^determine fulfilled
on r command:
- ^if <c.args.get[1]> == null {
- ^narrate '<&f>Message not sent, no message.'
- determine fulfilled
- queue clear
}
- ^narrate '<&e><player.name><&r> > <&6>Me <&r><&co> <context.args.get[1].to[<context.args.size>].as_string>' t:<player.flag[lastplayermessaged].as_player>
- ^narrate '<&e>Me<&r> > <&6><player.flag[lastplayermessaged].as_player.name> <&r><&co> <context.args.get[1].to[<context.args.size>].as_string>' t:<player>
- ^determine fulfilled
'messagesend':
type: task
script:
- ^if <server.match_player[<c.args.get[1]>]> == null {
- ^narrate '<&f>Player<&co> <c.args.get[1]> not found.'
- determine fulfilled
- queue clear
}
- ^if <context.args.get[2].to[<context.args.size>].as_string> == null {
- ^narrate '<&f>Message not sent, no message.'
- determine fulfilled
- queue clear
}
else {
- ^flag player lastplayermessaged:<server.match_player[<c.args.get[1]>]>
- ^narrate '<&e><player.name><&r> > <&6>Me <&r><&co> <context.args.get[2].to[<context.args.size>].as_string>' t:<server.match_player[<c.args.get[1]>]>
- ^narrate '<&e>Me<&r> > <&6><server.match_player[<c.args.get[1]>].as_player.name> <&r><&co> <context.args.get[2].to[<context.args.size>].as_string>' t:<player>
- ^determine fulfilled
}