aliases {
  compass-item {
    Item {
      Count = 1
      ItemType = "minecraft:compass"
      UnsafeDamage = 0
      DisplayName = "&lAnother way to open the GUI"
      ItemLore = [
        "&eYou can open the GUI in the game"
        "&ewhen you &lleft click&r &eby the &lcompass"
        "&eWhat happened when you right click it?"
      ]
    }
    PrimaryAction {
      Command = "console: say %player_name% has found the magic power of the compass!"
    }
    SecondaryAction = ${?PrimaryAction}
  }
  clock-item {
    Item {
      Count = 1
      ItemType = "minecraft:clock"
      UnsafeDamage = 0
      DisplayName = "&lAnother way to open the GUI"
      ItemLore = [
        "&eYou can open the GUI in the game"
        "&ewhen you &lleft click&r &eby the &lcompass"
        "&eWhat happened when you right click it?"
        "&e&l================================"
        "&eIn fact, &lnothing will happen"
        "&ebecause you do not have the permission for"
        "&eopening that GUI (&cvirtualchest.open.self.example&e)"
      ]
    }
    Requirements = "!player.hasPermission('virtualchest.open.self.example')"
    PrimaryAction {
      Command = "console: say %player_name% found nothing."
    }
    SecondaryAction = ${?PrimaryAction}
  }
  white-pane-item {
    Item {
      Count = 1
      ItemType = "minecraft:stained_glass_pane"
      UnsafeDamage = 0
      DisplayName = "&e&lIt will be changed to &8&lblack&e&l in 10 ticks (0.5s)"
    }
    Requirements = "tick % 20 < 10"
  }
  black-pane-item {
    Item {
      Count = 1
      ItemType = "minecraft:stained_glass_pane"
      UnsafeDamage = 15
      DisplayName = "&e&lIt will be changed to &f&lwhite&e&l in 10 ticks (0.5s)"
    }
    Requirements = "tick % 20 >= 10"
  }
}
virtualchest {
  TextTitle = "&1&lExample 2"
  Rows = 2
  UpdateIntervalTick = 10
  OpenActionCommand = """sound: minecraft:block.note.harp:1.6;
                         delay: 5;
                         sound: minecraft:block.note.harp;
                         delay: 5;
                         sound: minecraft:block.note.harp:0.625;
                         tell: Hello, %player_name%!;
                         broadcast: &9[Server]&r Player %player_name% has opened example2."""
  CloseActionCommand = """sound-with-pitch: minecraft:block.note.harp:1.6:1.5;
                          delay: 5;
                          sound-with-pitch: minecraft:block.note.harp:1.5;
                          delay: 5;
                          sound-with-pitch: minecraft:block.note.harp:0.625:1.5;
                          tell: Goodbye, %player_name%!;
                          broadcast: &9[Server]&r Player %player_name% has closed example2."""
  Slot0 = [
    ${aliases.white-pane-item}
    ${aliases.black-pane-item}
  ]
  Slot8 = [
    ${aliases.clock-item}
    ${aliases.compass-item}
  ]
  Slot9 = [
    ${aliases.white-pane-item}
    ${aliases.black-pane-item}
  ]
  Slot17 = [{
    Item {
      Count = 1
      ItemType = "minecraft:emerald_block"
      UnsafeDamage = 0
      DisplayName = "&lGoodbye! %player_name%"
      ItemLore = [
        "&eYou will open another chest GUI"
        "&eIt will take you 7 if you click this item"
        "&eYou have %economy_bal_format% now"
      ]
    }
    Requirements = "%economy_balance% >= 7"
    PrimaryAction {
      Command = "cost: 7; console: virtualchest open example %player_name%"
      KeepInventoryOpen = true
    }
    SecondaryAction {
      Command = "cost: 7; console: virtualchest open example %player_name%"
      KeepInventoryOpen = true
    }
  }, {
    Item {
      Count = 1
      ItemType = "minecraft:barrier"
      UnsafeDamage = 0
      DisplayName = "&lOops! %player_name%"
      ItemLore = [
        "&eYou want to open another chest GUI"
        "&eBut you do not have enough money (7)"
        "&eYou have %economy_bal_format% now"
      ]
    }
  }]
  TriggerItem {
    ItemType = "minecraft:compass"
    EnablePrimaryAction = true
    EnableSecondaryAction = false
  }
}
