Paste #67060: Untitled Paste

Date: 2020/04/06 20:33:04 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


WingsItem:
  type: item
  material: diamond_boots
  enchantments:
  - DURABILITY:5
  - PROTECTION:5
  lore:
  - "<&7>Fly I"

WingsHandler:
  type: world
  debug: false
  events:
    on player walks:
    - if <player.has_permission[essentials.fly]>:
      - flag player canfly
      - queue clear
    - if <player.has_town.not>:
      - queue clear
    - if "<player.inventory.slot[37].contains[WINGSITEM]>" && <player.location.has_town>:
      - if <player.location.town.contains[<player.town>]>:
        - flag player canfly
        - adjust <player> can_fly:true
    on player steps on air:
    - if <player.has_permission[essentials.fly]>:
      - queue clear 
    - if "<player.inventory.slot[37].contains[WINGSITEM].not>":
      - adjust <player> can_fly:false
      - flag player canfly:!
    - if <player.has_flag[flypvp]>:
      - adjust <player> can_fly:false
      - queue clear
    - if <player.has_flag[canfly].not>:
      - adjust <player> can_fly:false
      - queue clear
    - if <player.town.has_pvp>:
      - flag player canfly:!
      - adjust <player> can_fly:false
    - if <player.location.has_town.not>:
      - flag player canfly:!
    - if <player.location.has_town> && <player.location.town.contains[<player.town>].not>:
      - flag player canfly:!