Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Variables

kangarko edited this page Apr 6, 2019 · 22 revisions

A variable (placeholder) is a message in brackets {}, which is replaced by the actual data. Example: {player} is replaced with the player name. ChatControl supports thousands of placeholders and you can even create your own ones.

If you need more variables, install PlaceholderAPI.

For tutorial on creating own variables in variables/javascript.txt file, see here.

Native Variables

The following variables are already included in the plugin without the need of any third party plugin:

See the Compatibility article for more information!

  • ChatControl itself: {prefix}, {server_name}, {nms_version}, {timestamp}, {country_code} and {country_name}, {region_name} and {isp}
  • Bukkit (your server): {player}, {pl_address}, {tab_name}, {display_name}, {world} and {health}
  • Essentials or Nicky: {nick}
  • Vault: {pl_prefix}, {pl_suffix}, {pl_group} and {pl_primary_group}
  • Towny: {town} and {nation}
  • SimpleClans: {clan}
  • Factions (MassiveCore and FactionsUUID): {faction}
  • Nametags: {nametags_prefix} and {nametags_suffix}

Note: When using LuckPerms, to avoid double prefixes, we suggest you use {luckperms_prefix} from PlaceholderAPI plugin instead of {pl_prefix} from Vault.

PlaceholderAPI and MVdWPlaceholderAPI are supported, but please use {syntax} not %syntax%.

Variables with "+"

Some variables support the + operator at their end which will display an additional space when the variable is not null.

Example: If the player has faction, the message is "[Faction] kangarko: test", however if he does not have any faction we simply print "kangarko: test" without the annoying space " " before the player name.

Supported variables:

  • {pl_prefix+}
  • {pl_suffix+}
  • {pl_group+}
  • {nick+}
  • {town+}
  • {nation+}
  • {faction+}
  • {clan+}
  • {world+}

If you know a little bit of Javascript, you can easily code in this system for ANY variable (even those from PlaceholderAPI) using our custom variables.

SimpleClans

If you have PlaceholderAPI, ChatControl also adds the following variables for SimpleClans into PlaceholderAPI itself. Names should be self-explanatory.

SimpleClan Variables 1 SimpleClan Variables 2
{simpleclans_in_clan} {simpleclans_clan_tag}
{simpleclans_join_date} {simpleclans_clan_color_tag}
{simpleclans_rank} {simpleclans_founded_string}
{simpleclans_tag} {simpleclans_name}
{simpleclans_tag_label} {simpleclans_average_wk}
{simpleclans_rank} {simpleclans_balance}
{simpleclans_civilian_kills} {simpleclans_size}
{simpleclans_deaths} {simpleclans_total_civilian}
{simpleclans_kdr} {simpleclans_total_deaths}
{simpleclans_neutral_kills} {simpleclans_total_kdr}
{simpleclans_rival_kills} {simpleclans_total_neutral}
{simpleclans_weighted_kills} {simpleclans_total_rival}
{simpleclans_is_leader} {simpleclans_friendly_fire}
{simpleclans_allow_deposit} {simpleclans_allow_withdraw}
{simpleclans_is_unrivable} {simpleclans_leader_size}