Placeholders
The PlaceholderAPI placeholders MinionCore adds for scoreboards, tab lists, holograms and other plugins.
Show players how many minions they have, how many are working, and how many more they may place, anywhere PlaceholderAPI works. The placeholders are built into the plugin. There is nothing to download with /papi ecloud.
The placeholders are registered when the server starts with PlaceholderAPI installed. If you add PlaceholderAPI later, restart the server. They stay registered through /papi reload.
Player placeholders
| Placeholder | Returns |
|---|---|
%minioncore_total% | How many minions the player has placed |
%minioncore_active% | How many of those are working right now |
%minioncore_<type>% | How many minions of one type the player has placed |
%minioncore_limit% | The player's total minion limit |
%minioncore_limit_<type>% | The player's limit for one type |
%minioncore_seller_sold% | How many items the player's placed sellers have sold, added up |
%minioncore_seller_earned% | How much money the player's placed sellers have earned, added up |
%minioncore_seller_balance% | How much stored money the player's placed sellers have waiting to collect, added up |
%minioncore_holograms_view% | false when the player has hidden every minion hologram for themselves with /minion holograms view off, else true |
%minioncore_holograms_hidden% | How many of the player's placed minions have their hologram hidden |
<type>is the file name of a type in theminionsfolder, without.yml. With the shipped files that gives%minioncore_farmer%,%minioncore_miner%,%minioncore_lumberjack%,%minioncore_hunter%,%minioncore_fisherman%,%minioncore_chunkloader%,%minioncore_chunkcollector%,%minioncore_feeder%and%minioncore_seller%, and the same names afterlimit_. A type you add gets its own placeholders straight away.- "Working" means the minion's status is Working. A minion that is out of fuel, full, paused, broken down, has nothing to do, sits in an unloaded chunk or has stopped because its owner is offline does not count as active.
- Only placed minions count. Minion items in inventories or chests do not.
- A type id that does not exist, or a type that is switched off, is left as typed so the mistake is easy to spot.
- The two seller placeholders add up the totals kept by each seller the player has placed, so a seller that is picked up stops counting until it is placed again. The money is a plain number with up to two decimals, without a currency sign.
Limit placeholders
The two limit placeholders show the same limit the plugin checks when a player places a minion: the player's minioncore.limit nodes combined by limits.mode (added together with SUM, the largest with HIGHEST), or limits.default from config.yml (and max-per-player from the type file for a type limit) when they have none. See Limits by rank.
When the limit is unlimited, they show the text from the language file:
placeholders:
unlimited: "Unlimited"Limit placeholders need the player to be online, because permissions are only known for online players. For an offline player they return an empty value. The count placeholders work for offline players too.
Server placeholders
| Placeholder | Returns |
|---|---|
%minioncore_server_total% | How many minions are placed on the whole server |
%minioncore_server_active% | How many of those are working right now |
Counting every minion on each scoreboard update would be wasteful, so these numbers are counted once and then reused. They are counted again the next time they are asked for after placeholders.server-refresh-seconds has passed.
placeholders:
server-refresh-seconds: 30So a server placeholder can be up to that many seconds behind. Lower the value for a fresher number, raise it on a server with a very large number of minions.
These do not need a player, so they work in places with no viewer, such as a global hologram.
Examples
A scoreboard line:
&7Minions: &f%minioncore_total%&7/&f%minioncore_limit%
&7Working: &a%minioncore_active%A line for one type:
&7Miners: &f%minioncore_miner%&7/&f%minioncore_limit_miner%Test any of them in game with PlaceholderAPI:
/papi parse me %minioncore_total%Placeholders inside MinionCore
MinionCore also has its own placeholders for its menus, items, holograms and messages, such as a minion's level, fuel, status, %stored% and %capacity% for its storage, or %fuel_use% for the fuel each action uses. Those are a different set and only work inside the plugin's own files. See Menus and Holograms and effects.
Any PlaceholderAPI placeholder, from any plugin, can also be used inside MinionCore's own text when PlaceholderAPI is installed. In hologram lines they are filled in for the minion's owner, and only while the owner is online.
Related pages
- Limits by rank for how limits are worked out
- Messages and language for the unlimited text