dcommands_tempban: type: command name: tempban description: Bans someone temporarily. usage: /tempban [name] [duration] [reason] permission: dcommands.tempban tab completions: 1: data: arguments: minimum: 3 maximum: 999 debug: true script: - inject dcommands_inject_arguments - inject dcommands_inject_player #- if <[player]> == : # - narrate "<&[error]>You cannot tempban yourself!" # - stop - define duration - if ].exists>: - if <[player].is_banned>: - narrate "<&[error]>This player is already banned!" - stop - inject dcommands_server_definitions - inject dcommands_ban_definitions - define reason ].substring[2]> - define duration ]> - announce "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]> <&color[<[ban.message.color]>]>Player <[name]> has been temporarily banned for <&color[<[ban.value]>]><[duration].formatted_words><&color[<[ban.message.color]>]>, for <&dq><&color[<[ban.value]>]><[reason]><&color[<[ban.message.color]>]><&dq>." - announce to_console "<&color[<[ban.message.color]>]> has temporarily banned <[name]> for <[duration].formatted_words>, for <&dq><[reason]><&dq>." - flag <[player]> dcommands.tempbanned.expiration:]> expire:<[duration]> - kick <[player]> reason:Disconnected - ban <[player]> reason:<[reason]> source: expire:<[duration]> - else: - narrate "<&[error]>Invalid duration! Examples of valid durations:" - narrate "<&[error]>1d, 5m, 30s" dcommands_tempban_proc: type: procedure definitions: player|reason|expiration debug: true script: - inject dcommands_server_definitions - inject dcommands_ban_definitions - determine "<[server.prefix]><&color[<[server.color]>]><[server.name]><&r><[server.suffix]><&nl><&color[<[ban.message.color]>]><[ban.message.temp.header]><&nl><&nl><&color[<[ban.message.color]>]>Reason: <&color[<[ban.value]>]><[reason]><&nl><&color[<[ban.message.color]>]><[ban.message.temp.footer]> <&color[<[ban.value]>]><[expiration].format>" dcommands_ban_handler: type: world debug: true events: on player prelogin flagged:dcommands.banned: - determine kicked+|]> on player prelogin flagged:dcommands.tempbanned: - determine kicked+||]>