HolographicMenus

FREE HolographicMenus 2.0-SNAPSHOT-22

No permission to download
https://www.spigotmc.org/resources/holographicmenus.9389/

Contributors:
Sataniel



IF YOU ARE RUNNING A HOLOGRAPHIC MENUS II PREVIEW BUILD, PLEASE HAVE A LOOK AT THE WIKI FOR SETUP INFORMATION!

What is HolographicMenus?
Did you always think that commands are a very ugly way to ask the player for input? Every other game has GUIs. Why can't Minecraft have custom beautiful menus as well? If you did, then you'll love this plugin. Holographic Menus adds the possibility to script custom holographic GUI menus that execute a command when a button is punched. Just open the menu with a single command (/menu) and this will pop up:



Features
  • Provides a menu that doesn't take all of the player's attention so that he is able to use it even while in danger to get into combat
  • Create as many pages per menu as you wish(hit the 5th line to change)
  • Create as many menus as you wish (open them with /menu [name]
  • Nobody else is able to see or use a menu you opened (ProtocolLib required)
  • Every player can set different colours
  • All messages can be modified, so other languages can be used. Per player languages supported!
  • Multiple commands per button with CommandsXL.

Commands

  • /menu [menu name] - Opens a menu.
  • /holographicmenus,hm reload,r - Reload files.
  • /holographicmenus,hm settings,s [player] [head|highlight|text] [colour code] - Modify your personal menu style!
  • /holographicmenus,hm version,v - Plugin information.

Changelog
RELEASE
v1.0
Fix /hm for consoles
Per player adjustable language support
German and English (if you want to contribute another translation, feel free to submit a pull request or send me a lang.yml as a PM.); selectable standard language
Location where the menus pop up can be configured
Let menus follow the player whenever he moves
Does not work perfectly.
BETA
v0.2
Multiple menus
You're now able to create as many different menus as you wish!
Per group menus
If you want e.g. only one group of players to open a menu, just give them the permission "holographicmenus.menu.[menu name]"
Infinite pages per menu
You can use as many as you want. Well, in fact, you can't create more than 2147483647 because integers can't store more :p
Last page and chat type (unused) aren't stored inside data.yml anymore
This should improve performance a little bit.
Logger shows the menu, if a command is executed through it
To decrease confusion :smile:

v0.1.2
Commands executed using a menu are now logged
Thanks to @funbilla for this suggestion. Just have a look into the server log :smile:
Command variables
They are called "command variables", but accessable in both commands and messages. The player variable is something I totally forgot :° It allows you to use HM in many more use cases.

v0.1.1
Variables
Added ~75 new variables! You may request even more, though :smile:
Support for up to 20 pages
This will be rewritten to support infinite pages and infinite menus as soon as I have time. Config is a littlebit spammed, now. This will be improved after the rewrite as well, there'll be nothing but what you need.

v0.1
Close a player's menu when a new one is opened.
Now, players cannot open unlimited menus anymore ;)
Permissions
I'll update the resource thread to show them immediately.
Reload command: /hm reload
Requires node "holographicmenus.reload"
Ingame config commands to change personal menu style: /hm settings
Enter /hm settings [player] [head|highlight|text] [colour code] to personalize your menu without the need to change data.yml. Requires node...

ALPHA
v0.0.1
Imported menus from DRE2N-Visual
DRE2N-Visual is a plugin I wrote. It contained this menus, but no configurability. It couldn't be adapted for other servers.
Get menu data and language from file
To provide a little bit configurability.

Compatibilty

Server
CraftBukkit (or a CraftBukkit mod like Spigot or SportBukkit) for Minecraft 1.7.9 and higher
Java
7 and higher
UUIDs
Supported.
Known incompatibilities
Should work with everything that works with the dependencies.

Dependencies

ProtocolLib
It runs without ProtocolLib as well, but it's required to make holograms invisible for other players.
HolographicDisplays
Please note that this plugin is not an official addon written by filoghost, the author of HolographicDisplays.
CommandsXL
Highly recommended! If you need to run multiple commands with permissions the player does not have or as the console, CXL is the way to go.

Configuration instructions
HolographicMenus uses YAML files to store data. If you're not familiar with YAML or if you get into trouble for some reason, try out this to fix your file. config.yml contains the plugin configuration. It should be easily understandable. data.yml stores player data and shouldn't be modified, lang.ymlcontains the messages the plugin broadcasts.

Code (Text):
# HolographicMenus Configuration

# First of all, here's some stuff about global configuration.

# The language which is used if the player hasn't set a personal language.
# HM provides built in support for English, German and French.
# Other languages can be added easily, though.
defaultLang: english

# If the menu follows the player or not.
# This can cause lags, disable it if you have many players or already < 19 TPS!
# If you change it, restart your server. /hm r and /reload don't work.
followOnMove: false

# This part is about your menus.
menus:
# Here's the main menu.
main:
# How many pages does your menu need?
# Add more pages to support more options, but take care that you do not make it crowded with junk sothat it becomes easer to enter commands.
pages: '3'
# Now, let's setup the texts our main menu should show.
texts:
# This is the head line.
# Take a look at the SpigotMC.org resource thread to see what variables are supported.
head: '%head%Main Menu - %highlight%%page% / %maxpages%'
# This is the button to switch through the pages.
switch: '%head%%play% %play% %play%'
# This is the button to close your menu.
close: '%highlight%%play%%head%Close'
# That's it, we did the core part of the menu which is visible at every page.
# Let's have a look at your custom contents, now.
# All pages are listed. Take care that you have as much here as you set to 'pages: x'.
page:
'1':
# So, this is the first button on page one:
button1: '%highlight%%play%%text%Button 1'
# ...and the other pages and buttons, as well:
button2: '%highlight%%play%%text%Button 2'
button3: '%highlight%%play%%text%Button 3'
'2':
button1: '%highlight%%play%%text%Button 1'
button2: '%highlight%%play%%text%Button 2'
button3: '%highlight%%play%%text%Button 3'
'3':
button1: '%highlight%%play%%text%Button 1'
button2: '%highlight%%play%%text%Button 2'
button3: '%highlight%%play%%text%Button 3'
'4':
button1: '%highlight%%play%%text%Button 1'
button2: '%highlight%%play%%text%Button 2'
button3: '%highlight%%play%%text%Button 3'
'5':
button1: '%highlight%%play%%text%Button 1'
button2: '%highlight%%play%%text%Button 2'
button3: '%highlight%%play%%text%Button 3'
'6':
button1: '%highlight%%play%%text%Button 1'
button2: '%highlight%%play%%text%Button 2'
button3: '%highlight%%play%%text%Button 3'
'7':
button1: '%highlight%%play%%text%Button 1'
button2: '%highlight%%play%%text%Button 2'
button3: '%highlight%%play%%text%Button 3'
# Now, we can add a function to the buttons.
# Just do what you did above, but enter commands without "/".
commands:
page:
'1':
button1: say Button 1
button2: say Button 2
button3: say Button 3
'2':
button1: say Button 1
button2: say Button 2
button3: say Button 3
'3':
button1: say Button 1
button2: say Button 2
button3: say Button 3
'4':
button1: say Button 1
button2: say Button 2
button3: say Button 3
'5':
button1: say Button 1
button2: say Button 2
button3: say Button 3
'6':
button1: say Button 1
button2: say Button 2
button3: say Button 3
'7':
button1: say Button 1
button2: say Button 2
button3: say Button 3
# Do you want a new menu?
# Just copy everything since "main:" and paste it here!
# Do not forget to rename "main: " to the new menu's name, like I do here:
another_menu:
pages: '1'
texts:
head: '%head%Another Menu - %highlight%%page% / %maxpages%'
switch: '%head%%play% %play% %play%'
close: '%highlight%%play%%head%Close'
page:
'1':
# So, this is the first button on page one:
button1: '%highlight%%play%%text%Button 1'
# ...and the other pages and buttons, as well:
button2: '%highlight%%play%%text%Button 2'
button3: '%highlight%%play%%text%Button 3'
commands:
page:
'1':
button1: say Button 1
button2: say Button 2
button3: say Button 3
# That's it.

There are some variables that are replaced automatically.
Use this ones in messages:
  • %head% - colour for header texts
  • %text% - default text colour
  • %highlight% - highlighted text colour
  • %page% - menu page number
  • %maxpages% - maximum amount of pages
  • %play% - ▶
  • %copyright% - ©
  • %registered% - ®
  • %square% - ²
  • %cubic% - ³
  • %gbp% - £
  • %eur% - €
  • %trademark% - ™
  • %koppa% - ϟ
  • %dei% - Ϯ
  • %eternity% - ֍
  • %sajdah% - ۩
  • %boxtop% - ▀
  • %boxbottom% - ▄
  • %boxleft% - ▌
  • %boxright% -▐
  • %boxdot1% - ░
  • %boxdot2% - ▒
  • %boxdot3% - ▓
  • %boxfull% - █
  • %squareblack% - ■
  • %squarewhite% - □
  • %squareblacktiny% - ▪
  • %squarewhitetiny% - ▫
  • %left% - ←
  • %up% - ↑
  • %right% - →
  • %down% - ↓
  • %leftright% - ↔
  • %updown% - ↕
  • %muuuch% - ∞
  • %stripe% - ▬
  • %playup% - ▲
  • %playright% - ►
  • %playdown% - ▼
  • %playleft% - ◄
  • %rhomb% - ◊
  • %circle% - ○
  • %point% - ●
  • %smileywhite% - ☺
  • %smileyblack% - ☻
  • %sun% - ☼
  • %female% - ♀
  • %male% - ♂
  • %spade% - ♠
  • %clubs% - ♣
  • %heart% - ♥
  • %diamonds% - ♦
  • %quaver% - ♪
  • %2quavers% - ♫
  • %Agra% - À
  • %Aaig% - Á
  • %Acir% - Â
  • %Egra% - È
  • %Eaig% - É
  • %Ecir% - Ê
  • %Etre% - Ë
  • %Itre% - Ï
  • %Cced% - Ç
  • %agra% - à
  • %aaig% - á
  • %acir% - â
  • %egra% - è
  • %eaig% - é
  • %ecir% - ê
  • %etre% - ë
  • %itre% - ï
  • %cced% - ç
  • %ae% - æ
  • %oe% - œ
  • %Auml% - Ä
  • %Ouml% - Ö
  • %Uuml% - Ü
  • %auml% - ä
  • %ouml% - ö
  • %uuml% - ü
  • %sz% - ß
There are some variables that can be used in both messages and commands, too:
  • %name% - the player's name
  • %uuid% - the player's unique ID
  • %health% - the player's health
  • %coords% - the player's coordinates

Need permissions to disable anything? Here you go:

Code (Text):
permissions:
holographicmenus.menu.*:
description: Open every single menu.
default: true
holographicmenus.menu.[menu name]:
description: Open a specific menu.
default: true
holographicmenus.reload:
description: Reload your files.
default: op
holographicmenus.settings:
description: Change your settings.
default: true
holographicmenus.settings.others:
description: Change another user's settings.
default: op



Upcoming features
done, tested
done, not tested
work in progress
to do

Release 2.0 or later

  • Rewrite from scratch: I wrote the core part of Holographic Menus many months ago as a private and unconfigurable plugin called DRE2N-Visual. Nowadays, I'm a lot more experienced and able to create a lot more sophisticated code. HolographicMenus deserves a rewrite :smile:
  • Support for PlaceHolderAPI
  • Per group buttons
  • French translation
  • Trigger a sound when a button is punched or when a menu is opened
  • More convenient trigger to open the menu
  • Use items as a header
  • Button to switch to previous pages
  • Static menus that are visible and usable by anyone with the permission to do so; they do not move
  • Shops (Vault integration)
  • Option to set the opened page when the menu pops up instead of setting it to the last opened page
  • Handy, per-menu file configuration system
  • Statistic variables
  • Get chat input to handle command arguments
Unconfirmed requests
  • Support for IndividualHolograms as a library instead of HolographicDisplays
  • Standalone functionality

Support, bug reports & suggestions

I highly appreciate any kind of feedback and I'm willing to offer support. This is not the place to ask for support, though! Please do not PM me and do not misuse the review function for support requests. I'll do my very best to help if you open an issue at Github. Avoid to use the discussion thread, too, please, unless you don't have a Github account.
Top