Tab-Configuration

Configuration

Here you will get some information about how to configure your tabs.

You can find your configs in the plugins/ProTab/TabConfigs folder. Each page in the tab is represented by one config file.

Note: Keep in mind that before ProTab v1.0.4 your tab size is defined by the maximum player number defined in your server-properties. For a maximum-sized tab use 60 or more slots.

Default configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# This is the standard tab configuration.
# Inside this file the elements of this tab are defined.
# Each element is done as follows:
# <ElementName>:
#     Content: <content>
#     Row: <rowPosition>
#     Column: <columnPosition>
#     Width: <elementWidth>
#     Height: <elementHeight>
#     Orientation: <elementOrientation>
#     Parents:
#         - <parentName>
#         ...
#
# Content:            This is the core of each element. In here it's defined what will be shown in the tab.
#                    This can be just a text, just a content-macro or a mixture of both.
#                        text-example:             "This is a"
#                        content-macro-example:     "{{Player_Name}}"
#                        mixture-example:        "Hi, {{Player_Name}}"
#                    It's important to put the content into "", else there WILL be errors.
#                    To be able to use a content-macro an addon specifying it is required.
#                    It will then be replaced with the fitting content.
#                    Only field-type content-macros can be used inside a mixture.
#                    The type of a content-macro should be documented in it's addon.
#                    Possible types are: field, line and block.
#                    While some blocks can be custom-sized via the width and height property, all other elements
#                    have a fixed size: field are 1x1, lines 1x3 and blocks whatever is documented in their addon.
#                    Addons can be found on the plugin's BukkitDev page.
#                    To get a truly empty field, which will not be occupied by other elements via orientation
#                    please use "{{empty_field}}" or "<empty>" as content, for an empty line "{{empty_line}}" and for a customizable
#                    empty block "{{empty_block}}".
# Row:                This tells the plugin in which row to initially position the top left corner of this element. (Can be changed by Orientation)
# Column:            This tells the plugin in which column to position the top left corner of this element.
# Width:             If your block-type's height is customizable, enter it here. For all other elements, just omit this option.
# Height:             If your block-type's width is customizable, enter it here. For all other elements, just omit this option.
# Orientation:         Orientation has 4 possible values: 
#                        FIXED (won't move)
#                        UP (will move up if above it is free)
#                        DOWN (will move down if below it is free)
#                        FILLER (only for block-types with customizable height, will extend up and down as much as it can find free space)
#                    Be careful using anything else than FIXED, these will be applied in the order in which you defined the elements.
#                    For example: Defining a FILLER-block as first element would mean not seeing anything but this element, 
#                    because it instantly fills the whole tab, due to being applied first.
# Parents:            This optional attribute can be used to tell the plugin that this element should be shown 
#                    if and only if at least one of the specified parents is not empty.
#                    Reasons for elements being empty could be for example missing permissions.
#                    This feature is particularly useful for headers that should only show up if any of their content is available.


# The rank will determine the position in which this config will be shown.
# Configs are sorted ascending by their ranks.
Rank: 1

# Width of your tab list, must be in 1-4
TabWidth: 3

# Height of your tab list, ranges differ for each tab width
# Tab width 1: 1-20
# Tab width 2: 11-20
# Tab width 3: 14-20
# Tab width 4: 16-20
TabHeight: 20

Elements:
    First:
        Content: "This is a"
        Row: 1
        Column: 1
        #Width: 1
        #Height: 1
        Orientation: FIXED
    Second:
        Content: "§edefault"
        Row: 1
        Column: 2
        #Width: 1
        #Height: 1
        Orientation: FIXED
    Third:
        Content: "§6TabConfig!"
        Row: 1
        Column: 3
        #Width: 1
        #Height: 1
        Orientation: FIXED

Filename:
The filename of your configuration (<filename>.yml) will be used to announce it in chat upon scrolling to it (if enabled). If you'd like to have a colored name displayed in the chat you have to insert the color-codes into your filename. (example: §3Page.yml)

Rank:
This option is used to order your tab-configurations when scrolling through them. By default a player will spawned with the tab with the lowest rank active. When he then scrolls down, he will go through the configs in ascending rank order.

TabWidth:
This option defines the width of your tab page. Must be between 1 and 4.

TabHeight:
This option defines the height of your tab page. Its limits are determined by the tab width:

  • Width = 1 - Height between 01 and 20
  • Width = 2 - Height between 11 and 20
  • Width = 3 - Height between 14 and 20
  • Width = 4 - Height between 16 and 20

Elements:
This is the section where you define everything this tab-page will show. For examples see the default config above. You start by creating a new section with your next element's name as identifier. Then you can customize your element in several ways:

  • Content: Here you will tell ProTab what it should show in this element. You have 3 possibilities here:
    • String: Just enter any text and it will be shown. The number of characters is limited to 16 to avoid overlapping into other columns. Formatting codes are not counted into the character limit.
    • Macro: Enter a macro to display dynamic information. Possible macros can be found at the bottom of this page and on the pages of any addons. They can have 2 types: field, line or block
    • Mix: Mix macros and text. This is of course only possible with field-macros as any others would require more space than just 1 field.
  • Row & Column: The row and column in which the upper left corner of your element should be positioned in.
    It is not a problem to position an element in a way that would leave part of it outside the tab, that part will just be cut off.
  • Width & Height: These are only important if you are using a block-type macro and it is documented to have custom sizes. If that is the case enter the desired width or height in field here.
  • Orientation: This defines how your element should behave in the tab. There are 4 possible entries here:
    • FIXED: This means that the element will stay where you put it.
    • UP: If the fields above your element are empty, it will try to go upwards as far as possible.
    • DOWN: If the fields below your element are empty, it will try to go downwards as far as possible.
    • FILLER: If above or below your element are free field, the element will try to expand into those fields. This is only applicable for block-type macros with customizable height.

    • Caution - The element are processed in the order you define them in. Should you put your first element as a FILLER, it will go ahead and take the whole tab for itself.
    • Use - Some elements might stay empty if the player does not have the according permissions. In that case these options will let you reposition everything else accordingly.
  • Parents: Here you can enter a list of element names. This element will only be shown if at least one of the parent elements you entered is not empty. This can be useful for things like header, that should only show up if the player can see at least one of the elements below them.
    • Caution - Do not define cyclic parent dependencies or your configuration can not be loaded. ProTab will inform you in the server log if you should do so.

Macros

Macros will always be surrounded by {{ and }}. If you use these in your text you will get errors.

ProTab by itself is mainly an API and thus does not contain many macros. To get access to more macros visit the Addons page.

  • {{empty_field}}: will create an empty field. Same as entering the text <empty>. This sort of field will never be occupied by other elements even if their orientation says so. If you want an empty field that is able to be occupied just dont create an element for it.
  • {{empty_line}}: will create an empty line. This sort of line will never be occupied by other elements even if their orientation says so. If you want an empty line that is able to be occupied just dont create an element for it.
  • {{empty_block}}: will create an empty block. This sort of block will never be occupied by other elements even if their orientation says so. If you want an empty block that is able to be occupied just dont create an element for it.
    • This block is customizable in both height and width.

Examples


Comments

Posts Quoted:
Reply
Clear All Quotes