Skip to content

External Placeholder (PAPI) Document

TRCStudioDean edited this page Jun 3, 2025 · 5 revisions

Description

This is the user manual for placeholders outside the plugin (based on Placeholder API),
They can be used in all plugin configuration files that support PAPI placeholders, as well as in the language settings and custom configuration files of this plugin.
Basic format of placeholders: %lce_[Options...]% You can view the format and functional description of each placeholder here.

Compass

Player Attribute Placeholder Description

This feature is based on Player Attributes Placeholder so these placeholders only need to modify the basic format to be used as PAPI placeholders.
Format: Change the format of the player attribute placeholder {player:[PlayerName]:[Options...]} to %lce_player:[PlayerName]:[Options...]%.

When the player name is not filled in, %lce_me:[Options...]% can be used to consider the player currently operating as the player instance.

Example:

Original Format PAPI Format Result
{player:[PlayerName]:name} %lce_player:[PlayerName]:name% Name of the target player
{player:[PlayerName]:display_name} %lce_player:[PlayerName]:display_name% Display name of the target player
{player:[PlayerName]:location_x} %lce_player:[PlayerName]:location_x% The X-axis of the target player's location
{player:[PlayerName]:inventory_8_amount} %lce_player:[PlayerName]:inventory_8_amount% The amount of the 8th item in the target player's inventory
{player:[PlayerName]:inventory_1_lore_1} %lce_player:[PlayerName]:inventory_1_lore_1% The first line lore of the first item in the target player's inventory
{player:(Self):name} %lce_me:name% My own name
{player:(Self):display_name} %lce_me:display_name% My own display name
{player:(Self):location_x} %lce_me:location_x% The X-axis of self's location
{player:(Self):inventory_8_amount} %lce_me:inventory_8_amount% The amount of the 8th item in self's inventory
{player:(Self):inventory_1_lore_1} %lce_me:inventory_1_lore_1% The first line lore of the first item in self's inventory

World Attribute Placeholder Description

This feature is based on World Attributes Placeholder so these placeholders only need to modify the basic format to be used as PAPI placeholders.
Format: Change the format of the world attribute placeholder {world:[WorldName]:[Options...]} to %lce_world:[WorldName]:[Options...]%.
Example:

Original Format PAPI Format Result
{world:[WorldName]:time} %lce_world:[WorldName]:time% The current time of the target world
{world:[WorldName]:difficulty} %lce_world:[WorldName]:difficulty% The difficulty level of the game in the target world
{world:[WorldName]:world_type} %lce_world:[WorldName]:world_type% Types of target worlds (the end, nether, etc.)
{world:[WorldName]:game_rule_value_keepInventory} %lce_world:[WorldName]:game_rule_value_keepInventory% keepInventory game rule value of target world
{world:[WorldName]:chunk_at_0_0_is_slime_chunk} %lce_world:[WorldName]:chunk_at_0_0_is_slime_chunk% Is the chunk located at X=0,Z=0 in the target world a slime chunk

Server Attribute Placeholder Description

This feature is based on Server Attributes Placeholder so these placeholders only need to modify the basic format to be used as PAPI placeholders.
Format: Change the format of the server attribute placeholder {server:[Options...]} to %lce_server:[Options...]%.
Example:

Original Format PAPI Format Result
{server:motd} %lce_server:motd% Message that is displayed on the server list.
{server:bukkit_version} %lce_server:bukkit_version% Bukkit version that this server is running

Arithmetic Placeholder Description

Format: %lce_calculate:[Expression]%
Action: Used to calculate the specified expression and replace the placeholder. (Supports parenthesis operation)
Example:

Placeholder Result
%lce_calculate:1+1% 2
%lce_calculate:1+2-3*4/5% 0.6
%lce_calculate:(114514+114514)(114+5-1+4)+(114514+(114514+(114514+(1*(1+4)51*4))))% 5201314
%lce_calculate:1/0%

Configurator Placeholder Description

This feature is based on Configurator Placeholder so these placeholders only need to modify the basic format to be used as PAPI placeholders.
Format: Change the format of the configurator placeholder {[TableName]:[Path]} to %lce_configurator:[TableName]:[Path]%.
Exception: {[TableName]_jsondata} must be change to %lce_configurator_[TableName]%
Example:
If the configuration table looks like this (YAML format)

#Table name: Test
ExampleValue:
    Section1: 'Birthday'
    Section2: 20150811
    Section3: true
    List:
    - '1th'
    - '2th'
    - '3th'

The following is the effect of placeholder replacement

Original Format PAPI Format Result
{Test:ExampleValue.Section1} %lce_configurator:Test:ExampleValue.Section1% Birthday
{Test:ExampleValue.Section2} %lce_configurator:Test:ExampleValue.Section2% 20150811
{Test:ExampleValue.List:2} %lce_configurator:Test:ExampleValue.List:2% 2th
{Test_jsondata} %lce_configurator_Test% {"ExampleValue": {"Section3": true,"Section1": "Birthday","Section2": 20150811,"List": ["1th","2th","3th"]}}

Clone this wiki locally