DeluxeMenus

Discussion in 'Spigot Plugin Help' started by XPeke, Apr 25, 2017.

  1. I want to make a warp menu, I made it. But now I want every warp to have permission and to change items when they have and don't have permission.
     
  2. Not sure about changing items according to permission but you can add a "view_requirement" as shown in example below:

    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.

    Source: DeluxeMenus config file.
     
    • Agree Agree x 1
    • Useful Useful x 1
  3. You can also make it a click_requirement so that people will get a no permission message when they click it.
     
    • Agree Agree x 1