Mr_dsa1

DeluxeMenus requirements_menu.yml v1.14.1-Release

Jan 19th, 2026
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 8.76 KB | None | 0 0
  1. #
  2. # Requirements tutorial menu v1.0
  3. # authors: clip
  4. #
  5. # contributor: Andre_601
  6. #
  7. # In this tutorial you will learn all about menu requirements
  8. # Requirements allow you to restrict actions or even an entire menu to specific players.
  9. #
  10. # You can read more about requirements here:
  11. #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/requirements
  12. #
  13. menu_title: 'Requirements Menu'
  14. open_command: requirementsmenu
  15. size: 9
  16. #
  17. # as always, only cool people can open this menu :)
  18. #
  19. open_requirement:
  20.   requirements:
  21.     permission:
  22.      #
  23.       # "has permission" checks if a player has the required permission
  24.       #
  25.       # Read more:
  26.       #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/requirements#has-permission
  27.       #
  28.       type: has permission
  29.       permission: deluxemenus.shop
  30.       deny_commands:
  31.        - '[message] &cYou don''t have permission to do that!'
  32. items:
  33.  #
  34.   # Example 1: Shop Item
  35.   #
  36.   # This is a gold block, which allows you to buy or sell gold blocks for money.
  37.   #
  38.   'gold_block':
  39.     material: GOLD_BLOCK
  40.     slot: 0
  41.     lore:
  42.      - '&7Buy/Sell GOLD_BLOCK'
  43.       - ''
  44.       - '&7- Left-click: &bBuy 1 &7for &a$100'
  45.       - '&7- Right-click: &bSell 1 &7for &a$50'
  46.       - '&7- Shift-left-click: &bBuy 64 &7for &a6,400'
  47.       - '&7- Shift-right-click: &bSell 64 &7for &a$3,200'
  48.     #
  49.     # Requirement(s) when left-clicking an item.
  50.     #
  51.     left_click_requirement:
  52.       requirements:
  53.        #
  54.         # "has money" checks if the player has enough money. Requires Vault.
  55.         # "amount" defines how much the player needs to at least have.
  56.         #
  57.         # Read more:
  58.         #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/requirements#has-money
  59.         #
  60.         has_money:
  61.           type: has money
  62.           amount: 100
  63.       deny_commands:
  64.        - '[message] &cYou don''t have enough money for this!'
  65.     #
  66.     # Command(s) to execute when left-clicking the item.
  67.     # Those commands won't be executed when the above requirements aren't met.
  68.     #
  69.     # Read more:
  70.     #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/item#shift-left-middle-right-click-commands
  71.     #
  72.     left_click_commands:
  73.      - '[console] give %player_name% GOLD_BLOCK 1'
  74.       - '[takemoney] 100'
  75.       - '[message] &aYou bought 1 &6GOLD_BLOCK &afor $100'
  76.     #
  77.     # Requirement(s) for right-clicking an item.
  78.     #
  79.     right_click_requirement:
  80.       requirements:
  81.        #
  82.         # "has item" checks if the player has the specified item in their inventory.
  83.         # Except for "material" and "amount" are all other values optional and will default to a specific value.
  84.         # We check for if the player has 1 gold block.
  85.         #
  86.         # Read more:
  87.         #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/requirements#has-item
  88.         #
  89.         has_item:
  90.           type: has item
  91.           material: 'GOLD_BLOCK'
  92.           amount: 1
  93.       deny_commands:
  94.         - '[message] &cYou don''t have enough &6GOLD_BLOCK &cto sell! Required: 1'
  95.     #
  96.     # Command(s) to execute when right-clicking the item.
  97.     # Those commands won't be executed when the above requirements aren't met.
  98.     #
  99.     # Read more:
  100.     #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/item#shift-left-middle-right-click-commands
  101.     #
  102.     right_click_commands:
  103.      - '[console] clear %player_name% GOLD_BLOCK 1'
  104.       - '[givemoney] 50'
  105.       - '[message] &aYou sold 1 &6GOLD_BLOCK &afor $50'
  106.     #
  107.     # Requirement(s) when left-clicking an item while holding shift on the keyboard.
  108.     #
  109.     shift_left_click_requirement:
  110.       requirements:
  111.        #
  112.         # "has money" checks if the player has enough money. Requires Vault.
  113.         # "amount" defines how much the player needs to at least have.
  114.         #
  115.         # Read more:
  116.         #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/requirements#has-money
  117.         #
  118.         has_money:
  119.           type: has money
  120.           amount: 6400
  121.       deny_commands:
  122.        - '[message] &cYou don''t have enough money for this!'
  123.     #
  124.     # Command(s) to execute when left-clicking the item while holding shift.
  125.     # Those commands won't be executed when the above requirements aren't met.
  126.     #
  127.     # Read more:
  128.     #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/item#shift-left-middle-right-click-commands
  129.     #
  130.     shift_left_click_commands:
  131.      - '[console] give %player_name% GOLD_BLOCK 64'
  132.       - '[takemoney] 6400'
  133.       - '[message] &aYou bought 64 &6GOLD_BLOCK &afor $6400'
  134.     #
  135.     # Requirement(s) when right-clicking an item while holding shift on the keyboard.
  136.     #
  137.     shift_right_click_requirement:
  138.       requirements:
  139.        #
  140.         # "has item" checks if the player has the specified item in their inventory.
  141.         # Except for "material" are all other values optional and will default to a specific value
  142.         # which is either nothing (name) or 1 (amount).
  143.         # We check for if the player has 64 gold blocks.
  144.         #
  145.         # Read more:
  146.         #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/requirements#has-item
  147.         #
  148.         has_item:
  149.           type: has item
  150.           material: GOLD_BLOCK
  151.           amount: 64
  152.       deny_commands:
  153.         - '[message] &cYou don''t have enough &6GOLD_BLOCK &cto sell! Required: 64'
  154.     #
  155.     # Command(s) to execute when right-clicking the item while holding shift.
  156.     # Those commands won't be executed when the above requirements aren't met.
  157.     #
  158.     # Read more:
  159.     #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/item#shift-left-middle-right-click-commands
  160.     #
  161.     shift_right_click_commands:
  162.      - '[console] clear %player_name% GOLD_BLOCK 64'
  163.       - '[givemoney] 3200'
  164.       - '[message] &aYou sold 64 &6GOLD_BLOCK &afor $3200'
  165.   #
  166.   # Example 2: Free diamonds!
  167.   #
  168.   # This is a diamond, which will only be visible for people, that don't have the permission deluxemenus.free_diamonds.cooldown
  169.   # When you click the item will you get a diamond and a permission is set (using LuckPerms) temporary (acts as cooldown) before
  170.   # refreshing the GUI to update the displayed item.
  171.   #
  172.   'free_diamonds':
  173.     material: DIAMOND
  174.     slot: 1
  175.     lore:
  176.      - '&aFREE DIAMOND! [1/day]'
  177.       - ''
  178.       - '&7Click to get 1 free &bdiamond&7!'
  179.     #
  180.     # "priority" is used in case you have multiple items on the same slot.
  181.     # A lower number equals a higher priority.
  182.     #
  183.     priority: 0
  184.     #
  185.     # view_requirement makes it possible to only display the item when the requirements are met.
  186.     # When the requirements aren't met and a item with lower priority occupies the same slot, will it be displayed instead.
  187.     #
  188.     # Read more:
  189.     #   https://wiki.helpch.at/clips-plugins/deluxemenus/options-and-configurations/item#view-requirement
  190.     #
  191.     view_requirement:
  192.       requirements:
  193.         has_not_perm:
  194.          #
  195.           # "!has permission" checks if the player does NOT have the specified permission.
  196.           #
  197.           type: "!has permission"
  198.           permission: deluxemenus.free_diamonds.cooldown
  199.     #
  200.     # We give the item, set the permission with it expiring in 1 day and refresh the GUI to update the item.
  201.     #
  202.     left_click_commands:
  203.      - '[console] give %player_name% DIAMOND 1'
  204.       - '[console] lp user %player_name% permission settemp deluxemenus.free_diamonds.cooldown true 1d'
  205.       - '[refresh]'
  206.     #
  207.     # We give the item, set the permission with it expiring in 1 day and refresh the GUI to update the item.
  208.     #
  209.     right_click_commands:
  210.      - '[console] give %player_name% DIAMOND 1'
  211.       - '[console] lp user %player_name% permission settemp deluxemenus.free_diamonds.cooldown true 1d'
  212.       - '[refresh]'
  213.   #
  214.   # Example 3: Placeholder item
  215.   #
  216.   # This is a stone, that will be displayed as long as the player has the permission deluxemenus.free_diamonds.cooldown
  217.   #
  218.   'free_diamonds_cooldown':
  219.     material: STONE
  220.     slot: 1
  221.     lore:
  222.      - '&aFREE DIAMOND! [1/day]'
  223.       - ''
  224.       - '&cYou''re currently on cooldown. Click to refresh.'
  225.     #
  226.     # Higher number equals lower priority, meaning this item will only be displayed once the view_requirement of the
  227.     # above isn't met anymore.
  228.     #
  229.     priority: 1
  230.     #
  231.     # We refresh the GUI to update the item, if the view_requirement no longer matches.
  232.     #
  233.     left_click_commands:
  234.      - '[refresh]'
  235.     #
  236.     # We refresh the GUI to update the item, if the view_requirement no longer matches.
  237.     #
  238.     right_click_commands:
  239.      - '[refresh]'
  240.    
  241.  
  242.  
Advertisement
Add Comment
Please, Sign In to add comment