Skip to content

Feature guide: Header & Footer

NEZNAMY edited this page Feb 14, 2023 · 45 revisions

Content

About

Minecraft feature introduced in 1.8 showing text above and below playerlist. It cannot be displayed on 1.7 clients in any way.

Configuration

Option name Default value Description
enabled true Enables / Disables the feature
disable-in-worlds List List of worlds where the feature should be disabled. See Disabling features in worlds / servers for more info.
disable-in-servers List List of servers where the feature should be disabled. See Disabling features in worlds / servers for more info.

Global settings

The example above is using this configuration:

header-footer:
  header:
  - "This is the first line of header"
  - "2nd line of header"
  footer:
  - "This is the first line of footer"
  - "2nd line of footer"

It is the default header/footer for everyone, unless overridden in some way.

Per-world / per-server

header-footer:
  per-world:
    <your world>:
      header:
        - "Header in specified world"
      footer:
        - "Footer in specified world"
  per-server:
    <your server>:
      header:
        - "Header in specified server"
      footer:
        - "Footer in specified server"

For multiple worlds/servers to share the same settings, separate them with a;.
For worlds/server starting with a specified text, use * after or before the shared part.
Example:

per-world:
  world1;world2:
    header:
      - "Shared header in worlds world1 and world2"
  lobby-*:
    header:
      - "Header in all worlds starting with lobby-"

Note: To make per-world work on BungeeCord, install the TAB-Bridge plugin on your backend servers.

Per-group / per-player

groups.yml

MyGroup:
  header:
    - "This is a header for MyGroup group"
  footer:
    - "This is a footer for MyGroup group"
per-world:
  MyWorld:
    TestGroup:
      header:
        - "Header for group TestGroup in world MyWorld"

Same for users, which can be configured in users.yml.

Additional info

Additional note 1 - Not resetting on server switch

When under a BungeeCord network and having TAB installed on backend server and switching to another server, the header/footer will not reset. This is because BungeeCord makes it look like a world switch to the client. To avoid this, you have 2 options:

API

To get started with the API, see Developer API page.

To access this feature, you'll need to obtain HeaderFooterManager instance. Get it using TabAPI.getInstance().getHeaderFooterManager(). If this feature is disabled, the method will return null.

To set the header and/or footer for a player, use the following:

  • HeaderFooterManager#setHeader(TabPlayer, String)
  • HeaderFooterManager#setFooter(TabPlayer, String)
  • HeaderFooterManager#setHeaderAndFooter(TabPlayer, String, String)

To reset the header and/or footer for a player back to their original values, use the following:

  • HeaderFooterManager#resetHeader(TabPlayer, String)
  • HeaderFooterManager#resetFooter(TabPlayer, String)
  • HeaderFooterManager#resetHeaderAndFooter(TabPlayer, String, String)
Clone this wiki locally