Skip to content

Placeholders

Menu author

Placeholder is a part of text concluded between % chars.

The plugin supports placeholders in any parameter of the item, action, rule and in some activators. It doesn’t matter what data type the parameter accepts.

If the parameter accepts a number, and a placeholder inserted instead of it also returns a number, this will work. Therefore, if you use placeholders for numeric types, make sure that it is replaced with a number, otherwise, there will be an error.

There are default built in AM and third-party (PlaceholderAPI) placeholders.

PlaceholderTypeDescription
Player placeholders
%player_name%StringPlayer name
%player_display_name%StringDisplay name (with colors)
%player_level%NumberPlayer level
%player_xp%NumberPlayer XP
%player_location%StringPlayer location
%player_world%StringPlayer world
%player_uuid%StringUUID of player
%player_gm%StringBukkit’s gamemode name
Server placeholders
%server_players%NumberAmount of players
%server_players_<world>%NumberAmount of players in specified world
%server_name%StringName of server
%server_ip%StringIP address of server
%server_port%NumberServer port
%server_max_players%StringMax players slots
%server_version%StringVersion of server
BungeeCord placeholders
%bungee_online%NumberThe total count of players on all BungeeCord network
%bungee_players_<server>%NumberCount of players on a specific BungeeCord servers
Special placeholders
%hanim_:<animation_name>:<unique_id>%StringReturns next frame of the head animation from animated_heads.conf file
%ctg_page%NumberCurrent page index
%ctg_pages%NumberTotal amount of menu pages
%ctg_page_next%NumberNext page index
%ctg_page_prev%NumberPrevious page index
%ctg_elements%NumberTotal amount of catalog objects
%ctg_<extractor placeholder>%Depends on ExtractorGet value by some extractor from Catalog context
%activator_name%StringName of activator which opened menu
%activator_<extractor placeholder>%Depends on ExtractorGet value by some extractor from Activator context
%placed_<item_extractor_placeholder>%Depends on ExtractorGet info about last placed item
%placed_slot%NumberGet slot index in which last item was placed
%taken_<item_extractor_placeholder>%Depends on ExtractorGet info about last taken item
%taken_slot%NumberGet slot index from which last item was taken
%changed_<item_extractor_placeholder>%Depends on ExtractorGet info about final item after placing/taking

If you have installed PlaceholderAPI, some of this placeholder won’t work and will be replaced by big variety of placeholders from third party plugin instead. Special placeholders always works both with PAPI and without it.

Below is some examples of using placeholders in menu.

command {
console: "give %player_name% minecraft:diamond_sword"
}
itemAdd {
slot: 0
material: STONE
name: "&e%player_name% stone"
}

There are more placeholders to discover, e.g. placeholders for variables to read a variable value. You can use them whether you’ve installed PlaceholderAPI or not.

Sometimes AbstractMenus saves some context data. For example, when a player opens a menu via clickBlock, the plugin saves the block the player clicked. Activator placeholders give you access to that context. This is possible thanks to Value Extractors. To know how to use extractors as placeholders, see the Activator context article.

For each data exists own extractor that can accept limited amount of placeholders. Below described all extractors and placeholder which they can accept.

Get data from Minecraft’s block.

NameNote
block_typeBlock material
block_dataBlock data (MC 1.12-)
block_worldBlock world
block_xPosition by X axis
block_yPosition by Y axis
block_zPosition by Z axis
block_powerRedstone block power
block_tempTemperature of the biome of this block
block_biomeName of biome of this block

Get data from some world.

NameNote
world_nameName of the world
world_difficultyWorld difficulty (peaceful, normal, etc.)
world_max_heightMax height of building
world_pvpIs PVP allowed
world_seedSeed value of world
world_timeThe relative in-game time of this world. Analogous to hours * 1000
world_typeWorld type name (default, flat, etc.)
world_entitiesAmount of entities (include players) in world
world_playersAmount of players in world

Get data from some entity. If you sure that this entity is Living entity (animal, monster, player, etc.), you can use placeholders for living entities.

NameNote
All entities
entity_typeType name
entity_idNumeric id
entity_uuidUnique id
entity_nameGeneral name
entity_custom_nameCustom name (if exists)
entity_worldEntity world name
entity_loc_xPosition by X axis
entity_loc_yPosition by Y axis
entity_loc_zPosition by Z axis
entity_facingEntity facing (north, east, etc.)
entity_poseEntity pose (MC 1.14+)
entity_ticks_livedHow much entity lives
Living entity
entity_last_damageLast damage value
entity_no_damage_ticksHow long the entity has existed without damage
entity_killerLast killer name (if exists)
entity_eye_heightEye height value

Get data from ItemStack.

NameNote
item_typeItem material
item_dataItem data (MC 1.12-)
item_amountAmount in stack
item_max_stackMax possible stack size
item_display_nameFormatted name
item_localized_nameLocalized name
item_modelCustom model data (MC 1.14+)
item_serializedThe whole item serialized into base64 string. Can be used with serialized item property

Get data from WorldGuard region.

NameNote
region_idRegion name
region_priorityRegion priority
region_typeRegion type (cuboid, poly2d, etc.)
region_ownersList of owners
region_membersList of members
region_owners_amountAmount of owners
region_members_amountAmount of members

Get data from Citizens NPC.

NameNote
npc_idNumeric NPC id
npc_nameGeneral name
npc_full_nameFull name
npc_entity_<entity placeholder>Get value from NPC’s entity by Entity Value extractor

For example, you need to get NPC’s entity type. According to the Entity extractor format, your placeholder will look like this:

npc_entity_type

The only difference is an npc_ prefix.

Get data from parsed command (currently used by activators only).

NameNote
cmd_nameBase name of the command
cmd_argsAmount of arguments
cmd_arg:<argument key>Value of parsed argument by key
<argument key>:<placeholder>Get value with regular placeholder by player, entered in command

For example, you specified argument with key username by some activator. Then, to get value which user entered, you need to use placeholder like this:

cmd_arg_username

More about command building and reading arguments is in the Commands building section.