Paste #51130: Repo Script Ban Notifier

Date: 2018/12/14 21:51:02 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12


ban_notifier:
  type: world
  debug: false
  events:
    on player login:
    - if !<player.is_banned> queue clear
    - define targets <server.list_online_players.filter[has_permission[denizen.ban_notifier]]>
    - define creation <player.ban_info.created||null>
    - define expiration <player.ban_info.expiration||null>
    - narrate "<&c>[Ban Notifier]<&7> Banned player <&c><player.name><&7> tried to join from <&c><c.hostname.after[/]><&7>." targets:<def[targets]>
    - narrate " <&c>Reason<&co> <&7><player.ban_info.reason||None>" targets:<def[targets]>
    - narrate " <&c>Duration<&co> <&7><def[creation].time||Unknown> - <def[expiration].time||Never> (<&c><def[expiration].sub[<def[creation]>].formatted||?><&7> <&pipe> <&c><def[expiration].sub[<util.date.time.duration>].formatted||?><&7>)" targets:<def[targets]>