Date: 2018/11/05 17:28:50 UTC-08:00
Type: Denizen Script
# +----------------------
# | Weapon Restrictor
# |
# | Prevent custom items from being used as weapons...
# +----------------------
#
# @author ShadyMac
# @denizen-version 1.0.3-snapshot (BUILD 448-dev)
# @version 1.0
# +----------------------
#
PreventCustomItemWeapon:
type: world
events:
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:
- diamond_sword
- diamond_hoe
- diamond_pickaxe
- diamond_axe