PlaceholderAPI Integration
ECosmetics has full support for the PlaceholderAPI plugin, which allows you to display information about a player's cosmetics in other plugins, such as chat, scoreboards, or holograms.
Enabling Support
To activate the integration, make sure the following option is set in your config.yml file:
# config.yml
# Enable PlaceholderAPI support?
# Requires a server restart (not a plugin reload) to register the placeholders.
placeholder-api: trueAfter enabling this and restarting the server, you will be able to use all the placeholders listed below.
List of Placeholders
General Player Placeholders
These placeholders provide general information about the state of a player's cosmetics.
| Placeholder | Description | Example Output |
|---|---|---|
%ecosmetics_equipped_count% | Shows how many cosmetic items are currently equipped on the player. | 3 |
%ecosmetics_in_zone% | Returns true if the player is in a wardrobe zone, and false otherwise. | true |
%ecosmetics_get_zone% | Shows the ID of the wardrobe zone the player is in. If the player is not in a zone, it will return an empty value. | main_wardrobe |
Checking for Cosmetics
These placeholders allow you to find out if a player has access to a specific cosmetic.
| Placeholder | Description | Example Output |
|---|---|---|
%ecosmetics_get_{id}% | Checks if the player has the cosmetic with the specified ID. | true |
%ecosmetics_player_available_all% | Shows the total number of cosmetic items available to the player. | 42 |
%ecosmetics_player_available_hat% | Shows how many hats are available to the player. | 15 |
%ecosmetics_player_available_bag% | Shows how many backpacks are available to the player. | 10 |
%ecosmetics_player_available_walking_stick% | Shows how many walking sticks are available to the player. | 5 |
%ecosmetics_player_available_balloon% | Shows how many balloons are available to the player. | 7 |
%ecosmetics_player_available_spray% | Shows how many sprays are available to the player. | 5 |
Information about Equipped Cosmetics
These placeholders provide detailed information about the items that are currently equipped on the player. Replace <type> with the desired type: hat, bag, walking_stick, balloon, spray.
| Placeholder | Description | Example Output |
|---|---|---|
%ecosmetics_equipped_{type}% | Checks if the player has a cosmetic item of the specified type equipped. | true |
%ecosmetics_equipped_{type}_id% | Returns the ID of the equipped item of the specified type. | wizard_hat |
%ecosmetics_equipped_{type}_material% | Returns the material of the item. | LEATHER_HORSE_ARMOR |
%ecosmetics_equipped_{type}_modeldata% | Returns the CustomModelData of the item. | 10001 |
%ecosmetics_equipped_{type}_hex% | Returns the color of the item in HEX format (if applied). | #FF0000 |
%ecosmetics_equipped_{type}_r% | Returns the red (R) component of the color (0-255). | 255 |
%ecosmetics_equipped_{type}_g% | Returns the green (G) component of the color (0-255). | 0 |
%ecosmetics_equipped_{type}_b% | Returns the blue (B) component of the color (0-255). | 0 |
Examples
%ecosmetics_equipped_hat_id%will return the ID of the equipped hat.%ecosmetics_equipped_bag_hex%will return the color of the equipped backpack.- The placeholder
%ecosmetics_using_{type}%is an alias for%ecosmetics_equipped_{type}%.
General Server Information
These placeholders show the total number of cosmetic items available on the server.
| Placeholder | Description | Example Output |
|---|---|---|
%ecosmetics_available_all% | Shows the total number of cosmetics that exist on the server. | 150 |
%ecosmetics_available_hat% | Shows the total number of hats on the server. | 50 |
%ecosmetics_available_bag% | Shows the total number of backpacks on the server. | 40 |
%ecosmetics_available_walking_stick% | Shows the total number of walking sticks on the server. | 20 |
%ecosmetics_available_balloon% | Shows the total number of balloons on the server. | 25 |
%ecosmetics_available_spray% | Shows the total number of sprays on the server. | 15 |