TabWorks - smellyonionman/smellycraft GitHub Wiki

This plugin will auto-paginate an unlimited number of menus and items in a single menu entry.
The name is an homage to TabWorks for Windows 3.1, my first GUI experience. It was brilliant.
TabWorks separates your icons into discrete "tabs" to organize your menu system!
Say goodbye to dozens of itemscripts and inventory scripts! TabWorks is far leaner.
Permission checks ensure only the icons a player is permitted to use are displayed to them.

Pagination

Use the config to specify how many rows you'd like to display for individual item icons, from just one row to as many as five.
The last row is always reserved for tab icons, which are always shown.
These rows will fill with pages of server-defined icons from your Tab scripts in /plugins/Denizen/scripts/tabs/.
You can name the files and scripts whatever you like, as long as the file contains a well-formatted tabs: path.

Tab icons themselves are paginated, though instead of presenting the user a 'Next' arrow the Tab icons are simply shifted like thumbnails on a carousel-style image slider. If there are more icons then slots, clicking towards one end of the 'carousel' will shift its contents toward that end of the list.

Icons

Each icon has several properties you can define:

  • Permissions - A list of existing permission nodes. Having just one is enough to see the icon.
  • Icon, Display, Lore - Controls how the icon is presented within the Tab.
  • Message - Multiline. Displays in title of GUI when stay=true.
  • PCommand - A Bukkit command issued by the user.
  • SCommand - A Bukkit command isseued by the server. Use %p for player's name.
  • Glow - Advanced - A Denizenscript tag which enchants the icon, if true. If unsure, set to false.
  • Script - Advanced - When the icon is clicked, any Denizenscript in this block will execute. If unsure, remove.
  • Stay - Whether or not the menu remains open after a click. Defaults to true if not specified.

The only required keys are Icon, Display, and Lore.
Denizen tags can be used in Lore, Display, Message, Pcommand, and Scommand.
You can add silent as a final argument to any pcommand or scommand to suppress output.

Commands:

  • /tabworks reload - re-read the config file and reload scripts.
  • /tabworks update - check for updates
  • /tabworks save - immediately save settings to disk
  • /tabworks - opens to main menu

Permissions

If an icon's permission: key is filled, a player must have that permission in order to see the icon in the menu, or to run its command shortcut. The corresponding shortcut will also be suppressed from tab completion results until a player may run it.
Additionally, there are the following permissions:

  • tabworks.use - required for any type of usage
  • tabworks.admin - reload, update, or change settings These permissions may be redefined in your global config at /plugins/Smellycraft/tabWorks.yml.

Usage

Simply run /tabworks to open the menu to its default position.
Using /tabworks <tab> will open the menu to the specified Tab. Finally, /tabworks <tab> <icon> will automatically run an icon from a tab. Permitted users can run /tabworks reload to assume any changes made to configs. Commands have not been aliased to guarantee compatibility, you will have to add your own aliases.

Download

Get TabWorks

⚠️ **GitHub.com Fallback** ⚠️