From bfb88781af88fb97fd1d532338c4c23c71a3aa3a Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Thu, 4 Feb 2021 14:59:14 +0100 Subject: [PATCH] Improve placeholder pattern and info --- wiki/Placeholders.md | 70 ++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/wiki/Placeholders.md b/wiki/Placeholders.md index 18e4366..fc79bdf 100644 --- a/wiki/Placeholders.md +++ b/wiki/Placeholders.md @@ -522,10 +522,12 @@ Lists players with a certain permission or in a certain world... 'nuf said. > /papi ecloud download Math Lets you make simple or advanced calculations. -Placeholders are supported (You have to use `{}` instead of `%`). -Supports all calculations you can do with [EvalEx](https://github.com/uklimaschewski/EvalEx) with the exception of `%`. -You have to use `[prc]` for using the `%` symbol. -You can use `[precision:]` in the placeholder, to set, how many digits after the `.` are shown. +Placeholders are supported (You have to use `{}` instead of `%`). + +Supports all calculations you can do with [EvalEx](https://github.com/uklimaschewski/EvalEx). +Note that the `%` can't be used within the placeholder and that you have to to use `[prc]` instead. + +You can use `[precision:]` in the placeholder, to set how many decimal points are returned (e.g. `1.345` with `[precision:2]` returns `1.35`) ``` %math_% @@ -575,9 +577,10 @@ Lets you get placeholders for other players. (Not the one that triggers the acti Lets you parse any placeholder for the closest player. Will return blank if no player is found. -* `%parsenear_%` - Parses placeholder for closest player -* `%parsenear__%` - Parses placeholder for closest player in a radius - +``` +%parsenear_% # Parses placeholder for closest player +%parsenear__% # Parses placeholder for closest player in a radius +``` ---- - ### **ParseOther** @@ -697,36 +700,45 @@ Gives you various placeholders for the player, that triggers the action. Returns the player list matching the specified syntax -`%playerlist_,,,,%` - The `yes/no` is to include/exclude the player. +``` +%playerlist_,,,,% +``` -**Types:** -* `all` - Matches all players -* `online` - Matches online players -* `offline` - Matches offline players +**Type:** +- `all` - Matches all players +- `online` - Matches online players +- `offline` - Matches offline players -**Output Types:** -* `list` - Returns a list of players separated by `, `. You can also change the separator with `list-`.* -* `amount` - Returns amount of players matched -* `` - Returns the player at the specified index +**Subtypes:** +- `normal` - Matches all players. Requires no `` +- `perm` - Matches all players that match the permission defined by ``. Supports multiple permissions separated by `+` (`perm.1+perm.2`) +- `world` - Matches all players in the world defined by ``. Supports multiple worlds separated by `+` (`world+world_nether`) +- `nearby` - Matches all players in a certain radius defined by `` + +**Include:** +- `yes` - Include the player +- `no` - Exclude the player + +**Output:** +- `list` - Returns a list of players separated by `, `. You can also change the separator with `list-`.* +- `amount` - Returns amount of players matched +- `` - Returns the player at the specified index -**SubTypes:** -* `normal` - Matches all players - Requires no `` -* `perm` - Matches all players that match the permission defined by `` - Supports multiple separated by `+` (Ex: `perm1+perm2`) -* `world` - Matches all player in the world defined by `` - Supports multiple separated by `+` (Ex: `world1+world2`) -* `nearby` - Matches all players in a certain radius defined by `` **Examples:** -* `%playerlist_all,normal,yes,list%` - `Tanguygab, cj89898, funnycube, clip, Frcsty, GabyTM, ItsMeGlare` -* `%playerlist_online,perm,yes,amount,staff.admin%` - `2` -* `%playerlist_online,world,yes,2,buildingworld+spawnworld%` - `cj89898, funnycube` -* `%playerlist_online,nearby,yes,list,5%` - `Tanguygab, cj89898, clip` -* `%playerlist_online,nearby,no,list,5%` - `Tanguygab, clip` -* `%playerlist_online,nearby,no,list--,20%` - `Tanguygab-clip-Terfs` +``` +%playerlist_all,normal,yes,list% # Tanguygab, cj89898, funnycube, clip, Frcsty, GabyTM, ItsMeGlare +%playerlist_online,perm,yes,amount,staff.admin% # 2 +%playerlist_online,world,yes,2,buildingworld+spawnworld%` # cj89898, funnycube +%playerlist_online,nearby,yes,list,5% # Tanguygab, cj89898, clip +%playerlist_online,nearby,no,list,5% # Tanguygab, clip +%playerlist_online,nearby,no,list--,20% # Tanguygab-clip-Terfs +``` *You can also use `[placeholder]` for papi placeholders in addition to the javascript `{placeholder}`* *Note: `Offline` and `All` only support the `Normal` subtype.* -**Since `,` is used to separate the different parts of the placeholder, use `\.` instead if you want to display a `,`.* +**Since `,` is used to separate the different parts of the placeholder, use `\.` instead if you want to display a `,`.** ---- @@ -781,8 +793,8 @@ More info about the expansion can be found on the [GitHub-Repository](https://gi ``` %randomcolor_all% %randomcolor_color% -%randomcolor_format% %randomcolor_combined% +%randomcolor_format% %randomcolor_selected_% ``` ----