Solved DeluxeMenus Config Not Working

Discussion in 'Spigot Plugin Help' started by SubstepGamer, Apr 16, 2017.

  1. Hello, I am trying to set up a DeluxeMenu but whenever I try to reload the plugin with my config, it gets reset. This is the YAML Content
    Code (Text):

    # main GUI menu configuration
    #
    # configuration layout:
    #
    # menu_title: '<title of menu goes here>'
    # inventory_type: '<add this option if you want to create a menu of a different InventoryType aside from chest>'
    # command: <command to open this menu goes here>
    # open_requirement:
    #  expression: 'BukkitPlayer.hasPermission("some.permission");'
    #  deny_commands:
    #  - '[message] &cYou dont have permission to view that menu!'
    # size: <size of this menu, increments of 9, max size is 54>
    # update_interval: <time in seconds this gui should update for a player if an item is set to uodate placeholders>
    # items:
    #  <item identifier>:
    #  material: <name or id, for player heads use the format 'head;<players name/%player_name%>'>
    #  entitytype: <name of entity type for mob eggs> https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html'>
    #  data: <integer, used for data values for wool etc>
    #  amount: <amount of this item to show>
    #  slot: <slot number to put this item, slots start at 0 and end at 53 for a size 54 inventory>
    #  priority: <this is used if you have multiple items set for the same slot>
    #  permission: <the lowest priority item a player has permission for ex: 1, will be shown>
    #  update: <true/false if this item should update placeholders on the interval set for the gui menu this item is in>
    #  hide_attributes: <true/false if this item should display item attributes>
    #  hide_enchantments: <true/false if this item should display item enchantment / level> (useful for 'enchantment glow' items)
    #  hide_effects: <true/false if this item should display item effect attributes>
    #  hide_unbreakable: <true/false if this item should display item unbreakable attributes>
    #  display_name: <display name to show for this item>
    #  banner_meta: (this is used if you want to display a custom banner with specific patterns)
    #  - <dyecolor>;<PatternType> (more information on where to find DyeColor and PatternType names below)
    #  - 'RED;BASE'
    #  - 'WHITE;CREEPER'
    #  lore:
    #  - 'placeholders can be used in the name and lore'
    #  - '%<any placeholder from Papi>% shows the viewer values'
    #  enchantments: valid enchantment names can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
    #  - '<ENCHANTMENT>;<LEVEL>'
    #  - 'SILK_TOUCH;1'
    #  left_click_commands:
    #  - '[close]'
    #  right_click_commands:
    #  - '[player] spawn'
    #
    # All keys aside from update_interval are required for this menu to be valid and loaded!
    # The only options for an item to be considered valid are material and slot!
    #
    # banner_meta must be listed with a specific format:
    # banner_meta:
    # - <DyeColor>;<PatternType>
    #
    # Valid DyeColor names can be found here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/DyeColor.html
    # Valid PatternTypes can be found here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/banner/PatternType.html
    # ==============================================================
    #
    # Click requirement information
    #
    # You can now add 'click requirements' to left and right click commands!'
    # These are defined per item and must follow a specific format:
    #
    #  'item_one':
    #  material: DIAMOND
    #  slot: 3
    #  left_click_commands:
    #  - '[close]'
    #  - '[message] You were charged 100 dollars for clicking that item!'
    #  - '[console] eco take %player% 100'
    #  left_click_requirement:
    #  expression: '%vaulteco_balance% > 100'
    #  deny_commands:
    #  - '[close]'
    #  - '[message] &cYou dont have 100 dollars to click that item'
    #  right_click_commands:
    #  - '[close]'
    #  - '[message] You had permission to click that item!'
    #  right_click_requirement:
    #  expression: 'BukkitPlayer.hasPermission("some.permission.toclick")'
    #  deny_commands:
    #  - '[close]'
    #  - '[message] &cYou dont have permission to click that item'
    #
    # Every left/right_click_requirement MUST have an expression specified that would return a boolean (true/false)
    # These expressions must also follow JavaScript format as they are all javascript based!
    #
    # deny_commands: are optional and will be executed if the expression returns false.
    # You may use placeholders in your Javascript expressions to evaluate if the player meets the requirement or not.
    # You may also use a few keywords which give you access to the Player class and Bukkit.Server class if you understand the Bukkit API
    #
    # BukkitPlayer - references the Player object your expression is evaluating.
    # BukkitServer - references Bukkit.getServer() in the Bukkit API.
    #
    # The choice to use this system to evaluate if a player meets requirements to click an item was an easy choice.
    # This way I do not have to hook into every plugin to check if a player meets the requirement to click an item successfully.
    # You can simply use placeholders, or the keywords provided to give you access to the Player and Server objects.
    # If you want to check if a player has enough money, simply use an expression like so:
    #
    # expression: '%vaulteco_balance% >= 100' (checks if players balance is greater than or equal to 100)
    # If you want to charge the player, simply run the economy command to take the amount from the players balance in your click_commands
    # which will be executed if the player meets the requirement!
    # ==============================================================
    #
    # View requirement information
    #
    # You can add a 'view requirement' to an item if it has a priority value set for it
    # The view requirement has replaced the 'permission' entry for items
    # This allows you to specify a specific requirement in javascript for the item to be shown
    # In order to use view requirements, the item must have a priority value and a valid javascript expression
    # that returns true or false.
    #
    #  'item_one':
    #  material: DIAMOND
    #  slot: 3
    #  priority: 1
    #  view_requirement: '%vaulteco_balance% > 100'
    #  'item_two':
    #  material: IRON_INGOT
    #  slot: 3
    #  priority: 2
    #  view_requirement: 'BukkitPlayer.hasPermission("some.permission")'
    #  'item_three':
    #  material: STONE
    #  slot: 3
    #  priority: 3
    #
    # In the example above, the priority 1 item view requirement will be checked first, if a player has over 100 dollars, that item will be shown.
    # If the player does not meet the requirement for the first item, the item with priority 2 will be checked. If the player does not have the permission
    # node some.permission, the final item 'item_three' will be set to slot 3 as the player did not meet the requirement for the first 2 items with
    # a higher priority.
    #
    # You may use placeholders in your Javascript expressions to evaluate if the player meets the requirement or not.
    # You may also use a few keywords which give you access to the Player class and Bukkit.Server class if you understand the Bukkit API
    #
    # BukkitPlayer - references the Player object your expression is evaluating.
    # BukkitServer - references Bukkit.getServer() in the Bukkit API.
    #
    # The choice to use this system to evaluate if a player meets requirements to click an item was an easy choice.
    # This way I do not have to hook into every plugin to check if a player meets the requirement to click an item successfully.
    # You can simply use placeholders, or the keywords provided to give you access to the Player and Server objects.
    # If you want to check if a player has enough money, simply use an expression like so:
    #
    # view_requirement: '%vaulteco_balance% >= 100' (checks if players balance is greater than or equal to 100)
    # ==============================================================
    menu_title: '&a&lRanks &7[Your Rank: %ezrankspro_rank%'
    open_command: warpranks
    size: 54
    update_interval: 1
    items:
      'starteron':
        material: STAINED_GLASS_PANE
      data: 5
        slot: 11
        priority: 1
        update: true
        hide_enchantments: false
        view_requirement: '"essentials.warps.a".equalsIgnoreCase("yes")'
        display_name: '&a&lAvocado'
        lore:
        - '&8+---------------------+'
        - '&7Goes to warp a.'
      enchantments:
      - 'DURABILITY;1'
        left_click_commands:
        - '[player] warp a'
        - '[close]'
        right_click_commands:
        - '[player] warp a'
        - '[close]'
      'starteroff':
        material: 160
      data: 14
        slot: 11
        priority: 2
        update: true
        hide_enchantments: true
        display_name: '&8[&7Unavailable&8] &c&lWarp A'
        lore:
        - '&8+---------------------+'
        - '&7You do not have access to this warp!'
        - '&7You must get to rank Avocado to go here!'
        enchantments:
        - 'DURABILITY;1'
     
    So, I decided to put it into an Online YAML Parser and this is what I get
    Can someone please help me?
     
    #1 SubstepGamer, Apr 16, 2017
    Last edited: Apr 16, 2017
  2. Here is the fixed version:

    Code (Text):
    # main GUI menu configuration
    #
    # configuration layout:
    #
    # menu_title: '<title of menu goes here>'
    # inventory_type: '<add this option if you want to create a menu of a different InventoryType aside from chest>'
    # command: <command to open this menu goes here>
    # open_requirement:
    #  expression: 'BukkitPlayer.hasPermission("some.permission");'
    #  deny_commands:
    #  - '[message] &cYou dont have permission to view that menu!'
    # size: <size of this menu, increments of 9, max size is 54>
    # update_interval: <time in seconds this gui should update for a player if an item is set to uodate placeholders>
    # items:
    #  <item identifier>:
    #  material: <name or id, for player heads use the format 'head;<players name/%player_name%>'>
    #  entitytype: <name of entity type for mob eggs> https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html'>
    #  data: <integer, used for data values for wool etc>
    #  amount: <amount of this item to show>
    #  slot: <slot number to put this item, slots start at 0 and end at 53 for a size 54 inventory>
    #  priority: <this is used if you have multiple items set for the same slot>
    #  permission: <the lowest priority item a player has permission for ex: 1, will be shown>
    #  update: <true/false if this item should update placeholders on the interval set for the gui menu this item is in>
    #  hide_attributes: <true/false if this item should display item attributes>
    #  hide_enchantments: <true/false if this item should display item enchantment / level> (useful for 'enchantment glow' items)
    #  hide_effects: <true/false if this item should display item effect attributes>
    #  hide_unbreakable: <true/false if this item should display item unbreakable attributes>
    #  display_name: <display name to show for this item>
    #  banner_meta: (this is used if you want to display a custom banner with specific patterns)
    #  - <dyecolor>;<PatternType> (more information on where to find DyeColor and PatternType names below)
    #  - 'RED;BASE'
    #  - 'WHITE;CREEPER'
    #  lore:
    #  - 'placeholders can be used in the name and lore'
    #  - '%<any placeholder from Papi>% shows the viewer values'
    #  enchantments: valid enchantment names can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
    #  - '<ENCHANTMENT>;<LEVEL>'
    #  - 'SILK_TOUCH;1'
    #  left_click_commands:
    #  - '[close]'
    #  right_click_commands:
    #  - '[player] spawn'
    #
    # All keys aside from update_interval are required for this menu to be valid and loaded!
    # The only options for an item to be considered valid are material and slot!
    #
    # banner_meta must be listed with a specific format:
    # banner_meta:
    # - <DyeColor>;<PatternType>
    #
    # Valid DyeColor names can be found here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/DyeColor.html
    # Valid PatternTypes can be found here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/banner/PatternType.html
    # ==============================================================
    #
    # Click requirement information
    #
    # You can now add 'click requirements' to left and right click commands!'
    # These are defined per item and must follow a specific format:
    #
    #  'item_one':
    #  material: DIAMOND
    #  slot: 3
    #  left_click_commands:
    #  - '[close]'
    #  - '[message] You were charged 100 dollars for clicking that item!'
    #  - '[console] eco take %player% 100'
    #  left_click_requirement:
    #  expression: '%vaulteco_balance% > 100'
    #  deny_commands:
    #  - '[close]'
    #  - '[message] &cYou dont have 100 dollars to click that item'
    #  right_click_commands:
    #  - '[close]'
    #  - '[message] You had permission to click that item!'
    #  right_click_requirement:
    #  expression: 'BukkitPlayer.hasPermission("some.permission.toclick")'
    #  deny_commands:
    #  - '[close]'
    #  - '[message] &cYou dont have permission to click that item'
    #
    # Every left/right_click_requirement MUST have an expression specified that would return a boolean (true/false)
    # These expressions must also follow JavaScript format as they are all javascript based!
    #
    # deny_commands: are optional and will be executed if the expression returns false.
    # You may use placeholders in your Javascript expressions to evaluate if the player meets the requirement or not.
    # You may also use a few keywords which give you access to the Player class and Bukkit.Server class if you understand the Bukkit API
    #
    # BukkitPlayer - references the Player object your expression is evaluating.
    # BukkitServer - references Bukkit.getServer() in the Bukkit API.
    #
    # The choice to use this system to evaluate if a player meets requirements to click an item was an easy choice.
    # This way I do not have to hook into every plugin to check if a player meets the requirement to click an item successfully.
    # You can simply use placeholders, or the keywords provided to give you access to the Player and Server objects.
    # If you want to check if a player has enough money, simply use an expression like so:
    #
    # expression: '%vaulteco_balance% >= 100' (checks if players balance is greater than or equal to 100)
    # If you want to charge the player, simply run the economy command to take the amount from the players balance in your click_commands
    # which will be executed if the player meets the requirement!
    # ==============================================================
    #
    # View requirement information
    #
    # You can add a 'view requirement' to an item if it has a priority value set for it
    # The view requirement has replaced the 'permission' entry for items
    # This allows you to specify a specific requirement in javascript for the item to be shown
    # In order to use view requirements, the item must have a priority value and a valid javascript expression
    # that returns true or false.
    #
    #  'item_one':
    #  material: DIAMOND
    #  slot: 3
    #  priority: 1
    #  view_requirement: '%vaulteco_balance% > 100'
    #  'item_two':
    #  material: IRON_INGOT
    #  slot: 3
    #  priority: 2
    #  view_requirement: 'BukkitPlayer.hasPermission("some.permission")'
    #  'item_three':
    #  material: STONE
    #  slot: 3
    #  priority: 3
    #
    # In the example above, the priority 1 item view requirement will be checked first, if a player has over 100 dollars, that item will be shown.
    # If the player does not meet the requirement for the first item, the item with priority 2 will be checked. If the player does not have the permission
    # node some.permission, the final item 'item_three' will be set to slot 3 as the player did not meet the requirement for the first 2 items with
    # a higher priority.
    #
    # You may use placeholders in your Javascript expressions to evaluate if the player meets the requirement or not.
    # You may also use a few keywords which give you access to the Player class and Bukkit.Server class if you understand the Bukkit API
    #
    # BukkitPlayer - references the Player object your expression is evaluating.
    # BukkitServer - references Bukkit.getServer() in the Bukkit API.
    #
    # The choice to use this system to evaluate if a player meets requirements to click an item was an easy choice.
    # This way I do not have to hook into every plugin to check if a player meets the requirement to click an item successfully.
    # You can simply use placeholders, or the keywords provided to give you access to the Player and Server objects.
    # If you want to check if a player has enough money, simply use an expression like so:
    #
    # view_requirement: '%vaulteco_balance% >= 100' (checks if players balance is greater than or equal to 100)
    # ==============================================================
    menu_title: '&a&lRanks &7[Your Rank: %ezrankspro_rank%'
    open_command: warpranks
    size: 54
    update_interval: 1
    items:
      'starteron':
        material: STAINED_GLASS_PANE
        data: 5
        slot: 11
        priority: 1
        update: true
        hide_enchantments: false
        view_requirement: '"essentials.warps.a".equalsIgnoreCase("yes")'
        display_name: '&a&lAvocado'
        lore:
        - '&8+---------------------+'
        - '&7Goes to warp a.'
      enchantments:
      - 'DURABILITY;1'
        left_click_commands:
        - '[player] warp a'
        - '[close]'
        right_click_commands:
        - '[player] warp a'
        - '[close]'
      'starteroff':
        material: 160
      data: 14
        slot: 11
        priority: 2
        update: true
        hide_enchantments: true
        display_name: '&8[&7Unavailable&8] &c&lWarp A'
        lore:
        - '&8+---------------------+'
        - '&7You do not have access to this warp!'
        - '&7You must get to rank Avocado to go here!'
        enchantments:
        - 'DURABILITY;1'