Paste #50581: Untitled Paste

Date: 2018/11/06 04:00:05 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
13
14
15
16
17
18


PreventCustomItemWeapon:
    type: world
    events:
###On Player clicks with a diamond sword
        on entity damaged by player:
        - define blacklist_items <s@blacklist_items.yaml_key[BLOCKED]>
        - if <my list.contains [<def[blacklist_items]>]> {       
            - narrate "You can not use this Weapon / Item in Combat!!!"
            - determine CANCELLED 
            }
###Blacklist items###           
blacklist_items:
    type: yaml data
    BLOCKED:
    - i@diamond_sword.material.name
    - i@diamond_hoe.material.name
    - i@diamond_pickaxe.material.name 
    - i@diamond_axe.material.name