Tubing XML

The Tubing XML is a definition how to build Tubing GUIs Below I will explain the different parts of the XML

<TubingGui>

The TubingGui is the root element of the XML file. it defines the size of the GUI and contains multiple GuiItems.

<TubingGui size="54" id="some-gui">
        <title>Some GUI</title>

        <GuiItem slot="12"
                material="PAPER"
                onLeftClick="select-reason&reason=SOME_REASON">
           <name>Some reason</name>
        </GuiItem>
</TubingGui>

attributes

attributedescriptionrequired

size

How big the inventory should be. Must be a multiple of 9.

true

id

id of the GUI. Only used for styling

false

class

Class of the GUI. Only used for styling

false

children

childDescriptionrequired

title

The title of the GUI

true

GuiItem

The different items you want to show in the GUI

false, but it makes sense to have at least some items in the GUI

<title>

The title of the GUI.

attributes

attributedescriptionrequired

color

The color of the text

false

id

id of the GUI. Only used for styling

false

class

Class of the GUI. Only used for styling

false

<GuiItem>

This is the biggest part of the GUI. Every GuiItem represent an item inside the inventory.

<GuiItem slot="13" id="appeal-info" material="BOOK">
    <name class="item-name">
        <t id="appeal-status-label">Appeal </t>
        <t id="appeal-status-value" color="&6">OPEN</t>
    </name>
    <Lore>
        <LoreLine>
            <t color="&b" id="appealer-label" class="detail-label">Appealer: </t>
            <t color="&6" id="appealer-value" class="detail-value">appealer</t>
        </LoreLine>
    </Lore>
</GuiItem>

attributes

attributedescriptionrequired

slot

The index of the inventory slot

true

material

Material of the item

true

if

Only show the item when the value of the if attribute is true

false

permission

Only show the item if the current player has the given permission

false

onLeftClick

action to execute when the player left clicks on this item

false

onMiddleClick

action to execute when the player middle clicks on this item

false

onRightClick

action to execute when the player right clicks on this item

false

id

id of the GUI. Only used for styling

false

class

Class of the GUI. Only used for styling

false

children

childdescriptionrequired

name

The name of the element shown in the GUI

false

Lore

The lore of the item. Consists of multiple LoreLines

false

<name>

Direct child of GuiItem. It describes the name of the GuiItem.

The name is an element that has 2 possible content type. Either just a String, or multiple <t> tags.

attributes

attributedescriptionrequired

color

The color of the text

false

id

id of the GUI. Only used for styling

false

class

Class of the GUI. Only used for styling

false

<Lore>

Direct child of GuiItem. It describes the Lore of the GuiItem.

attributes

attributedescriptionrequired

if

Only show the lore when the value of the if attribute is true

false

permission

Only show the lore if the current player has the given permission

false

id

id of the GUI. Only used for styling

false

class

Class of the GUI. Only used for styling

false

children

childdescriptionrequired

List of LoreLine

Every LoreLine is one line of lore of the item inside the inventory

true

<LoreLine

Direct child of Lore. Describes one line of lore of one item.

The name is an element that has 2 possible content type. Either just a String, or multiple <t> tags.

attributes

attributedescriptionrequired

if

Only show the loreline when the value of the if attribute is true

false

permission

Only show the loreline if the current player has the given permission

false

id

id of the GUI. Only used for styling

false

class

Class of the GUI. Only used for styling

false

<t>

t is used to define a text. You can have multiple <t> tags next to each other. This is mostly useful if you want to give the user of the plugin more control over the styling of the different parts of the text.

without T tags

<LoreLine>&bAppealer: &6${appeal.appealerName}</LoreLine>

With T tags

<LoreLine>
   <t color="&b" id="appealer-label" class="detail-label">Appealer: </t>
   <t color="&6" id="appealer-value" class="detail-value">${appeal.appealerName}</t>
</LoreLine>

Although the first one is much shorter, there is no way to allow Tubing to style this GUI. Using T tags we now have control over the color and label and value of the text. These can be styled separately by using Tubing styling files.

attributes

attributedescriptionrequired

color

The color of the text part

false

if

Only show the loreline when the value of the if attribute is true

false

permission

Only show the loreline if the current player has the given permission

false

id

id of the GUI. Only used for styling

false

class

Class of the GUI. Only used for styling

false

Last updated