DeluxeMenus icon

DeluxeMenus -----

The all in one GUI menu plugin!



1.3 My favorite update, added click requirements (javascript based requirements for clicking items)
1.3

This is my all time favorite update :)

I was going to wait to release this as it has been ready for a while, but decided what the heck.

Added Javascript based click requirements for left and right click commands to be executed!

I am not going to do a huge amount of explaining here, simply post the default configuration so you can read that as it has all information needed to get you an understanding of how it works.

Code (Text):
# example GUI menu configuration
#
# configuration layout:
#
# menu_title: <title of menu goes here>
# command: <command to open this menu goes here>
# 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%>'>
#     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>
#     display_name: <display name to show for this item>
#     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!
#
# ==============================================================
#
# 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!
# ==============================================================
menu_title: '&fexample &aGUI menu'
open_command: examplegui
size: 9
items:
  '1':
    material: head;%player_name%
    slot: 0
    display_name: '&aHey &f%player%'
    lore:
    - '&aYou opened a GUI menu'
    - '&aThis menu is just for you!'
    left_click_commands:
    - '[close]'
    right_click_commands:
    - '[player] help'
    - '[close]'
  '2':
    material: DIAMOND
    data: 0
    amount: 1
    slot: 1
    display_name: '&aBuy &f1 &3Diamond'
    lore:
    - '&bClick to buy one diamond'
    left_click_commands:
    - '[close]'
    - '[console] give %player_name% diamond 1'
    - '[console] eco take %player_name% 100'
    left_click_requirement:
      expression: '%vaulteco_balance% > 100'
      deny_commands:
      - '[close]'
      - '[message] &cYou do not have &a$&f100 &cto purchase a diamond!'
Added [message] <message> which can now be used in click_commands or deny_commands.

Be sure to leave a like and review of this resource is you enjoy this update! I am very happy with it and I think this requirement system is far more configurable than any other GUI plugin offers! This resource is completely free to you and a review only takes a few minutes of your time and is greatly appreciated!
----------, Sep 9, 2015
Resource Information
Author:
----------
Total Downloads: 507,357
First Release: Sep 1, 2015
Last Update: Dec 13, 2023
Category: ---------------
All-Time Rating:
604 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings