2.0.X | Custom Buttons

About

You can create custom buttons for menus and specify what they do.
There are some very useful button actions you can attach to it to let it open links, join servers, sending commands and much more!

Creating Custom Buttons

To add a custom button to a menu, you need to create a new layout for it.

When you're in the Layout Editor, just add a new button element to the layout.

Now you can rightclick the new button to set what it should do when clicking on it, by using the Button Action option.

Button Actions

Value needed? Value content Value Examples
Yes The link https://google.de

sendmessage

Send a message or a command to the chat.

Value needed? Value content Value Examples
Yes The message/command Hi everyone! :)
----
/time set 0

quitgame

Quit minecraft.

Value needed? Value content Value Examples
No / /

joinserver

Join a minecraft server.

Value needed? Value content Value Examples
Yes The server IP 127.0.0.1:25565
----
play.hivemc.com

loadworld

Load a minecraft world (from the client's playable minecraft worlds).

Value needed? Value content Value Examples
Yes The world folder name My World
----
cool_world

openfile

Open a file or folder.

Value needed? Value content Value Examples
Yes The path to the file/folder mydata/info.txt
----
images/minecraft

movefile

Move a file to a new path.

Value needed? Value content Value Examples
Yes The old file path and the new file path, separated by semicolon (';'). path/to/file.txt;new/path/of/file.txt

copyfile

Copy a file.

Value needed? Value content Value Examples
Yes The path to the file and the path to copy it to, separated by semicolon (';'). path/to/file.txt;copy/to/path/filecopy.txt

deletefile

Completely delete a file.

Value needed? Value content Value Examples
Yes The path to the file. path/to/file.txt

renamefile

Rename a file.

Value needed? Value content Value Examples
Yes The path to the file and its new name, separated by semicolon (';'). path/to/file.txt;newfilename.txt

downloadfile

Download a file from the web.
This action runs in the main thread, which means it will cause the game to freeze until it is done.

Value needed? Value content Value Examples
Yes The URL to the file and the path to save it to, separated by semicolon (';'). https://myhoster.com/archive.zip;path/to/save/archive.zip

unpackzip

Unpack a ZIP file.
This action runs in the main thread, which means it will cause the game to freeze until it is done.

Value needed? Value content Value Examples
Yes The path to the ZIP file and the directory to unpack it to, separated by semicolon (';'). path/to/archive.zip;unpack/to/path/

prevbackground

Switch to the previous menu background animation.

Value needed? Value content Value Examples
No / /

nextbackground

Switch to the next menu background animation.

Value needed? Value content Value Examples
No / /

opencustomgui

Open one of your custom GUIs.

Value needed? Value content Value Examples
Yes The custom GUI identifier mycoolmenu

opengui

Open an existing GUI by its menu identifier.

Value needed? Value content Value Examples
Yes The menu identifier (Get it by clicking on the "Menu Info" button in menus) the.menu.identifier

reloadmenu

Reload the current menu along with reloading customization files, the mod config, button scripts and more.
This action is similar to clicking the "Reload" button in the top-right corner of supported menus.

Value needed? Value content Value Examples
No / /

runscript

Run a button script.

Value needed? Value content Value Examples
Yes The file name of your script, without the file extension. myscript

mutebackgroundsounds

Mute or unmute background audio added by FancyMenu.

Value needed? Value content Value Examples
Yes true/false (to mute or unmute the audio) true

runcmd

Run a CMD/Terminal command.
Supports per-OS commands to set different commands for different operating systems.

Value needed? Value content Value Examples
Yes The command. start_server.bat
-----
[linux:./start_server.sh];[windows:start_server.bat];

To set separated commands for different operating systems, just format your value like this:

[windows:start.bat];[macos:./start];[linux:./start.sh];

This will run the command start.bat on Windows, the ./start command on macOS and the ./start.sh command on Linux.

It's important to put every command section in brackets ([ ]) and to separate every section with a semicolon (;).

closegui

Close the current menu/GUI.

Value needed? Value content Value Examples
No / /