PlaceholderAPI - booksaw/BetterTeams GitHub Wiki
Placeholder API
Click on placeholderAPI to go to the spigot page
If you are unfamiliar with placeholderAPI please watch the explanation video by Premiere Setups for the basics.
Placeholders are supported in many ways, primarily by providing placeholders. Along with the provided placeholders, all messages in messages.yml support placeholders so you can alter all messages to your heart's desire.
Please note, there is no ecloud expansion required for these placeholders. As long as you have BetterTeams and PlaceholderAPI on your server, these will all work.
Requesting a new placeholder
If you need a placeholder from better teams that is not currently listed below, you can request it by creating a feature request
Provided Placeholders
As there are so many placeholders, every iteration cannot be displayed. Instead a method for building placeholders is shown. There are several different types of placeholders. Firstly you need to pick the context of the placeholder that is relevant to you. Secondly the {type} variable in the placeholder can be replaced with the specific placeholder you want, see below the first list for options.
%betterteams_{type}%
- A placeholder in the context of the current player, used for example to display team information on a scoreboard%betterteams_position_{type}_{rank}%
- Displays information about the team at the defined {rank} on the/team score
leaderboard%betterteams_balanceposition_{type}_{rank}%
- Displays information about the team at the defined {rank} on the/team baltop
leaderboard%betterteams_membersposition_{type}_{rank}%
- Displays information about the team at the defined {rank} based on the number of members in the team%betterteams_static_{type}_{team}%
- Displays information about the {team} referenced by name in the placeholder%betterteams_staticplayer_{type}_{player}%
- Displays information about the {player} referenced by name in the placeholder
Now you have the base structure of the placeholder, you need to decide which placeholder for the specified team / player you want to use in place of the {rank} variable. The options are as follows:
name
- The name of the teamtag
- The tag of the teamdisplayname
- The display name of the teamdescription
- The description of the teamopen
- If the team is invite only or open to everyonescore
- The score of the teammoney
- The current balance of the teamcolor
- The color set by the teamonlinelist
- A list of all online players in the teamofflinelist
- A list of all the offline players in the teamonline
- The number of online players in the teammembers
- The total number of players in the teamlevel
- The current level of the teammaxmoney
- The maximum balance the team is allowed at their current levelmaxmembers
- The maximum number of players the team is allowed at their current levelmaxwarps
- The maximum number of warps the team is allowed at their current levelpvp
- If the team has pvp toggled on using/team pvp
rank
- The rank the current player holds within the team (only works on%betterteams_{type}% and %betterteams_staticplayer_{type}_{player}
placeholders)title
- The current title of the player within the team (only works on%betterteams_{type}% and %betterteams_staticplayer_{type}_{player}
placeholders)owners
- The list of owners within the teamadmins
- The list of admins within the teamdefaultmembers
- The list of players in a team who have not been promoted into a specific rolepositionscore
- Current position of the team ranked by scorepositionbal
- Current position of the team ranked by balancepositionmembers
- Current position of the team ranked by amount of membersinTeam
- Returns the value ofplaceholder.inTeam
if the player is in a team, if not returns the value ofplaceholder.notInTeam
. Only works in the context of%betterteams_inTeam%
Example
A few examples follow so the syntax is more clear.
Example 1
The team name to use in the tab list. This is a relational placeholder to the current player. %betterteams_name%
Example 2
The score of the team with the highest score on the server. %betterteams_position_score_1%
Editing messages
The messages a placeholder can all be configured in the messages.yml file (or your server's translation file) in the placeholder
section.
The value placeholder.noTeam
is returned when a targeted player is not in a team.
These configuration options can be used to add additional formatting to the placeholder only when a player is in a team, for example if you want the team's displayname (%betterteams_displayname%
)to be surrounded by []
but want no value when the player is not in a team, you can do the following configuration:
placeholder:
noTeam: ''
displayname: '[{0}]'