Tubing Guis
Tubing GUIs is a framework for building Inventory GUIs easily.
It is build upon Tubing. So you need to build a Tubing plugin for this to work. Look into the Tubing Setup before continuing here.
Setup
Begin by adding the Tubing GUI dependency
<dependency>
<groupId>be.garagepoort.mcioc</groupId>
<artifactId>tubing-bukkit-gui</artifactId>
<version>${tubing.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>The basic GUI framework requires 3 main components. A GUI Controller, a TubingGui and the GuiActionService.
Resources
The below configuration is only needed if you are using tubing gui templates and the maven-resources-plugin.
It's best to exclude these files to prevent maven from injecting properties into the file.
Example
config.yml
Gui Controller
The controller defines 2 actions. The message-select action will open the inventory which will show what message to broadcast.
Message select template
Command
The broadcast command will open the select GUI if you do not provide it any argument. We can call any GUI action using the GuiActionService.
Last updated
Was this helpful?