Skip to content

menus

The eight GUI files in guis/ - layout format, item fields, toggle states, every action and the tokens each menu gets.

Every menu is a file in plugins/OptimalTeams/guis/. You can retheme them freely: change titles, sizes, materials, lore and slots. After editing, run /teamadmin reload.

File Opens with Size
team-menu.yml /team (in a team) 36
hub-menu.yml /team (no team) 27
invites-menu.yml /team invites, /team accept, hub button 45
members-menu.yml /team members, team menu button 45
settings-menu.yml /team settings, team menu button 27
top-menu.yml /team top, team and hub buttons 36
team-info-menu.yml clicking a team in the top menu 36
confirm-menu.yml disband, leave, kick, transfer 9

Every file has a Title, a Size (a multiple of 9), an Items section and an optional top-level Temporary-Icons section. Some files add their own keys (slot lists, icon templates), listed per file below.

Title: "Team {team}"
Size: 36
Items:
Filler-Item:
Material: BLACK_STAINED_GLASS_PANE
Name: "&r"
Slots: [0-35]
Members-Item:
Material: ARMOR_STAND
Slot: 11
Name: "&e&lTeam Members"
Lore:
- "&6 - &7Members: &f{members}&8/&f{max-members}"
Actions:
- "[members]"
Temporary-Icons:
Not-Allowed:
Material: BARRIER
Name: "&c&lError!"
Lore:
- "&7You cannot do that, check the &fchat&7!"
  • Slots: Slot: takes one number, Slots: a list where each entry is a number or an a-b inclusive range. Slots count from 0 and must lie inside Size.
  • Overlaps: when two items share a slot, the one with fewer slots wins. A full-size filler therefore never covers a button, and you don’t have to cut holes in it.
  • Actions: a list run in order on click. An item without Actions (or with Actions: []) is display only.
  • Item names: the keys under Items are free to rename, except the ones this page calls out (Chat-Item, Friendly-Fire-Item, Open-Item, Own-Team-Item, Confirm-Item), which the plugin looks up by name.
  • Title: resolved once when the menu opens. It takes the menu’s tokens but not page tokens.

Open menus refresh every Auto-Update-Ticks (default 20 ticks) set in config.yml, so counts, online status and points stay live.

Field Description
Material Item material. Legacy and modern names both work.
Amount Stack size, default 1.
Name Display name.
Lore Lore lines.
Base64 Head texture for a PLAYER_HEAD. "{player}" shows the viewer’s own head.
Custom-Model-Data / Item-Model Resource pack models.
Glow true adds an enchant glint.
Item-Flags Bukkit item flags, e.g. [HIDE_ATTRIBUTES], [HIDE_ADDITIONAL_TOOLTIP].
Enchantments, Unbreakable, Hide-Tooltip Also supported.

A toggle item has no Material of its own. It has a States section with an Enabled and a Disabled item, and shows the one matching the current value:

Friendly-Fire-Item:
Slot: 12
Actions:
- "[friendly-fire]"
States:
Enabled:
Material: IRON_SWORD
Name: "&a&lFriendly Fire"
Disabled:
Material: WOODEN_SWORD
Name: "&c&lFriendly Fire"

Toggle items are Chat-Item (team menu) and Friendly-Fire-Item / Open-Item (settings menu). Both states are required. You may delete a toggle item entirely to hide that button.

Flashed for two seconds in the clicked slot, then the real item comes back.

Key Flashed when In
Not-Allowed A click is refused (no permission, no home, team full, …). The chat message says why and DENIED plays. team, hub, settings, confirm, invites, members
No-Previous-Page [previous] on the first page. invites, members, top, team-info
No-Next-Page [next] on the last page. invites, members, top, team-info

Delete an entry and that click simply doesn’t flash.

Plugin actions:

Action Does
[team] Open the team menu (or the hub without a team).
[members] Open the members menu.
[settings] Open the settings menu.
[top] Open the team top menu.
[invites] Open the invites menu.
[create] Start the create prompt.
[invite] Start the invite prompt.
[rename] Start the rename prompt.
[home] Teleport to the team home (closes the menu).
[sethome] Set the team home where you stand.
[chat] Toggle team chat.
[friendly-fire] Toggle friendly fire.
[open] Toggle open joining.
[leave] Open the leave confirmation.
[disband] Open the disband confirmation.

Paging (invites, members, top and team-info menus): [previous] and [next] (also [previous-page] / [next-page]). They play PAGE-CHANGED or NO-PAGE-FOUND.

Generic actions (any menu):

  • [back] - return to the menu this one was opened from, or close if there is none
  • [close] - close the menu
  • [player] <cmd> / [command] <cmd> - run a command as the player
  • [console] <cmd> - run a command from console
  • [message] <text> - send the player a message
  • [broadcast] <text> - send a message to everyone
  • [actionbar] <text> - show an action bar
  • [title] <title>;<subtitle>;<in>;<stay>;<out> - show a title (timings in ticks, optional)
  • [sound] NAME;volume;pitch - play a sound

{player}, the menu’s tokens and, with PlaceholderAPI, %...% resolve in action arguments. An action type that does not exist is an error when clicked, so check the console after editing.

What /team opens for a player in a team. Header: Profile-Item (the viewer’s head through Base64: "{player}") and Info-Item. Middle: Members-Item, Home-Item, Chat-Item (toggle), Settings-Item, Top-Item. Bottom: Leave-Item, Close-Item, Disband-Item.

Chat-Item shows Enabled while the viewer has team chat mode on.

What /team opens for a player without a team: Create-Item ([create]), Invites-Item ([invites], shows the pending count), Top-Item ([top]) and Close-Item.

Key Description
Invite-Slots Slots for the invites, in order. Default [10-16, 19-25, 28-34].
Invite-Icon One invite. A PLAYER_HEAD shows the inviter’s head.

Left click an invite to join that team, right click to decline it. Expired invites disappear on the next refresh.

Key Description
Member-Slots Slots for the roster. Default [10-16, 19-25, 28-34].
Leader-Icon The leader. Must be a PLAYER_HEAD.
Member-Icon Everyone else. Must be a PLAYER_HEAD.

Both icons get the member’s head. Members are listed highest role first, then by name. Left click promotes, right click demotes, shift click opens the kick confirmation. Invite-Item in the header runs [invite].

Rename-Item ([rename]), Friendly-Fire-Item and Open-Item (toggles), Set-Home-Item ([sethome]) and Back-Item. Each button checks the viewer’s role permission when clicked.

The team leaderboard.

Title: "Team Top"
Size: 36
Team-Slots: [11-15, 20-24]
Roster-Entry: "&6 - {role} &f{member} &8({status}&8)"
Roster-Roles:
Leader: "&6Leader"
Co-Leader: "&eCo-Leader"
Moderator: "&aModerator"
Member: "&7Member"
Roster-More: "&6 - &7...and &f{more} &7more"
Roster-Limit: 10
Team-Icon:
Material: PLAYER_HEAD
Name: "&e&l#{rank} &f&l{team}"
Lore:
- "&6 - &7Leader: &f{leader} &8({leader-status}&8)"
- "&6 - &7Points: &f{points}"
- "&eMembers:"
- "{roster}"
Key Default Description
Team-Slots [11-15, 20-24] Slots for teams, in rank order. The number of slots is the teams per page.
Team-Icon One team. A PLAYER_HEAD shows the leader’s head. Clicking it opens that team’s info menu.
Roster-Entry One line per member, expanded where a lore line is exactly {roster}. Tokens: {role}, {member}, {status}.
Roster-Roles The role names used in Roster-Entry. All four are required. These are separate from Roles in config.yml.
Roster-Limit 10 Most members listed per team. At least 1.
Roster-More Added after the list when a team has more members than the limit. Token: {more}.

Own-Team-Item (optional, header) shows the viewer’s own team. It is a States item:

  • In-Team - the viewer’s team, with the same tokens as Team-Icon including {roster}. Clicking opens its info menu.
  • No-Team - shown without a team. Clicking starts the create prompt.

Delete Own-Team-Item to drop it from the menu.

A read-only view of any team, opened from the top menu. Info-Item in the header shows the team; [back] returns to the top menu.

Key Description
Member-Slots Slots for the roster. Default [10-16, 19-25].
Member-Icon One member. Must be a PLAYER_HEAD; shows that member’s head.

The 9-slot confirmation for disband, leave, kick and transfer.

Descriptions:
Disband: "&7Disband &f{team} &7forever"
Leave: "&7Leave the team &f{team}"
Kick: "&7Kick &f{member} &7from the team"
Transfer: "&7Make &f{member} &7the team leader"
Key Description
Descriptions.Disband / Leave / Kick / Transfer Fills {confirmation} for that action. All four are required.
Items.Confirm-Item Required. Clicking it runs the action. Needs no Actions.
Items.Cancel-Item Ships with [back], returning to the previous menu.

After a kick or transfer the menu returns to where it was opened from; after a disband or leave it closes.

Team tokens are {team}, {leader}, {members}, {max-members}, {online}, {points}, {points-raw}, {rank}, {friendly-fire}, {open}, {home}, {created} (see Tokens). Member tokens are {member}, {role}, {status}, {joined}. Every menu also gets {player} (the viewer), and paged menus get {page}, {pages} and {results}.

Menu Tokens
team-menu, settings-menu Team tokens, {role} (the viewer’s role)
hub-menu {invites} (pending), {teams} (teams on the server), {min}, {max} (name length), {max-members}
invites-menu {invites}, {teams}. Invite-Icon adds team tokens, {inviter}, {expires}
members-menu Team tokens, {role} (viewer). Icons add member tokens ({role} is then the member’s)
top-menu {teams} (ranked teams). Team-Icon and Own-Team-Item.In-Team add team tokens, {leader-status}, {roster}
team-info-menu Team tokens, {leader-status}. Member-Icon adds member tokens
confirm-menu Team tokens, {role}, {confirmation}. For kick and transfer also the target’s member tokens