Paste #44992: Untitled Paste

Date: 2017/10/14 17:19:43 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


NoSwear_Config:
    type: yaml data
    config:
        swears:
        - bitch
        - fuck
        - shit
        - test
NoSwear:
    type: world
    events:
        on player chats:
        - define wordList <s@NoSwear_Config.yaml_key[config.swears]>
        - if <context.message.contains_any_text[<def[wordList]>]> {
          - playsound <player> sound:ENTITY_ENDERMEN_SCREAM pitch:1.5
          - adjust <player> 'action_bar:<&4><&l>Such language is unacceptable!'
          - determine <context.message.replace_text[regex:(<def[worldList].separated_by[|]>)].with[**]>
          }