Paste #23375: Edit of P#23374 - Edit of P#23373 - Edit of P#23372 - Untitled Paste

Date: 2015/12/03 11:57:14 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#-------------------------#
#--GadgetTool--v0.1-----#
#--------------------#
#----------------#
############
###CONFIG###
############
gadget_config:
  type: yaml data
  GadgetTool:
  #----DEFAULT ITEM-----#
  #--Default: compass---#
    DefaultItem: compass
  #---------------------#
##########
###ITEM###
##########
gadget_item:
  type: item
  material: <s@gadget_config.yaml_key[GadgetTool.DefaultItem].as_item||i@compass>
  display name: GadgetTool
  lore:
  - Versitile shapeshifting tool.
  - Use carefully and wisely.
  - Mode<&co> Default
#############
###COMMAND###
#############
gadget_command:
  type: command
  debug: true
  name: gadget
  description: GadgetTool command.
  usage: /gadget
  aliases:
  - gg
  permission: gadget.command
  allowed help:
  - determine <player.is_op||<player.has_permission[gadget.command]>>
  script:
  - if <context.server||true> {
    - announce to_console "<&c>This command is for players only!"
    - queue clear
    }
  - if <player.has_permission[gadget.command].not||true> {
    - narrate "<&c>Sorry, you don;t have permission to perform this command!"
    - queue clear
    }
  - give i@gadget_item