PlaceHolders
Momoservertw edited this page Aug 1, 2021
·
34 revisions
Index:
Plugin | Description |
---|---|
PlaceHolderAPI | To get more placeholders. |
PlayerPoints | Give and take points from players. |
If the player is offline, the placeholder of player without "(offline)" will return nothing.
Placeholder | Target | Description | Example |
---|---|---|---|
%TARGET_last_login% | player(offline) | Gets the last date and time that this player was witnessed on this server. | |
%TARGET_has_played% | player(offline) | false | |
%TARGET_gamemode% | player | CREATIVE | |
%TARGET_flying% | player | true | |
%TARGET_sneaking% | player | true | |
%TARGET_money% | player(offline) | The money of player has. | 1000 |
%TARGET_points% | player(offline) | The points of player has. | 100 |
%TARGET_perm_PERMISSION% | player(offline) | Checks if the target has certain permission node. | true |
If the player is offline, the placeholder of player without "(offline)" will return nothing.
Target | Description |
---|---|
player | The main target player. |
entity | The main target entity. |
entity | The main target entity type. |
block | The main target block. |
item | The main target item. |
Placeholder | Target | Description | Example |
---|---|---|---|
%TARGET% | player(offline), entity, block, item, material | The target name. | Momocraft |
%TARGET_type% | entity, block, item, material | The target type. | ZOMBIE |
%TARGET_type_local% | entity, block, item, material | The the local language of target type. | 殭屍 |
%TARGET_display_name% | player, entity, item | §c§lZombie King | |
%TARGET_has_custom_name% | player, entity, item | true | |
%TARGET_amount% | item | 64 | |
%TARGET_max_stack% | item, material | 16 | |
%TARGET_uuid% | player(offline), entity | f11915de-e889-3fd8-b79a-71ba4ffe919b | |
%TARGET_world% | player, entity, block, location | world | |
%TARGET_loc% | player, entity, block, location | 100, 80, 100 | |
%TARGET_loc_x% | player, entity, block, location | 100 | |
%TARGET_loc_y% | player, entity, block, location | 80 | |
%TARGET_loc_z% | player, entity, block, location | 100 | |
%TARGET_loc_x%NUMBER% | player, entity, block, location | The coordinate of x and offset value. | 101 |
%TARGET_loc_y%NUMBER% | player, entity, block, location | The coordinate of y and offset value. | 81 |
%TARGET_loc_z%NUMBER% | player, entity, block, location | The coordinate of z and offset value. | 101 |
%TARGET_nearby%TYPE%name/type/amount%GROUP%RADIUS% | player, entity, block, location | Getting the nearby targets' name, type, or amount. TYPE: "players", "entities, materials", "mythicmobs". GROUP: "all", Custom group in CorePlus/groups.yml. More information: group.yml | Momocraft, §c§lZombie King, CREEPER |
%TARGET_world_time% | player, entity, block, location | The world time. | 23850 |
%TARGET_boimes% | player, entity, block, location | DESERT | |
%TARGET_light% | player, entity, block, location | Mobs spawn: ">8", Crop grow: ">9", Ice melts: ">12". More information: Light | 15 |
%TARGET_liquid% | player, entity, block, location | The location is in liquid or not. | true |
%TARGET_solid% | player, entity, block, location | The location is in solid or not. | false |
%TARGET_cave% | player, entity, block, location | 【malfunction】The location is in cave or not. Searching radius: 3 blocks | true |
%TARGET_outside% | player, entity, block, location | The location is under the sun or not. | true |
%TARGET_residence% | player, entity, block, location | The location's residence name. | spawn |
%TARGET_in_residence% | player, entity, block, location | The location's residence name. | true |
%TARGET_is_usable% | block, item, material | If the material is door, button, crafing_table, etc. | true |
%TARGET_is_container% | block, item, material | If the material is chest, shulker_box, hopper, etc. | true |
%TARGET_is_itemjoin% | block, item | If the item is ItemJoin's custom item. | true |
%TARGET_itemjoin_node% | block, item | Gets the itemjoin node. | menu |
%TARGET_is_menu% | block, item | If the item is server menu. Needs to setup in CorePlus/config.yml | true |
%TARGET_skull_textures% | block, item | Gets the item's skull textures. | TEXTURES_VALUE |
%TARGET_inv_type%SLOT% | player, entity, block | The item type in the slot. | DIAMOND_SWORD |
%TARGET_inv_name%SLOT% | player, entity, block | The item name in the slot. | &e&lExcalibur |
%TARGET_is_usable%SLOT% | block, item, material | If the material in the slot is door, button, crafing_table, etc. | true |
%TARGET_is_container%SLOT% | block, item, material | If the material in the slot is chest, shulker_box, hopper, etc. | true |
%TARGET_is_itemjoin%SLOT% | block, item | If the item in the slot is ItemJoin's custom item. | true |
%TARGET_itemjoin_node%SLOT% | block, item | Gets the itemjoin node in the slot. | menu |
%TARGET_is_menu%SLOT% | block, item | If the item in the slot is server menu. Needs to setup in CorePlus/config.yml | true |
%TARGET_skull_textures%SLOT% | block, item | Gets the item's skull textures in the slot. | TEXTURES_VALUE |
%TARGET_location%LOCATION% | player, entity, block, location | If the target is in the Location. | true |
%TARGET_blocks%BLOCKS% | player, entity, block, location | If the target is nearby certain Blocks. | true |
Placeholder | Description | Example |
---|---|---|
%localtime_time% | To get the local time. | 2020/08/08 12:30:00 |
%random_number%NUMBER% | To get a random number. | 1120 |
%random_list%STRING1,STRING2% | To get a random online player except for some players. | Momocraft |
%random_player% | To get a random online player. | AllBye |
%random_player_except%PLAYER1,PLAYER2% | To get a random online player except for some players. | Momocraft |
Space: "{s}"
b
Empty: "{e}"
Placeholder | Description | Input | Output |
---|---|---|---|
%str_replace%VALUE%OLDCHAR%NEWCHAR% | Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar. | %str_replace%Momocraft%craft%{e}% | Momo |
%str_endsWith%VALUE%SUFFIX% | Tests if this string ends with the specified suffix. | %str_endsWith%Momocraft%craft% | true |
%str_startsWith%VALUE%PREFIX% | Tests if this string starts with the specified prefix. | %str_endsWith%Momocraft%momo% | false |
%str_startsWith%VALUE%PREFIX%OFFSET% | Tests if the substring of this string beginning at the specified index starts with the specified prefix. | %str_startsWith%Momocraft%omo%1% | true |
%str_matches%VALUE%REGEX% | Tells whether or not this string matches the given regular expression. | %str_matches%Momocraft%[a-zA-Z]+% | true |
%str_toLowerCase%VALUE% | Converts all of the characters in this String to lower case using the rules of the given Locale. | %str_toLowerCase%Momocraft% | MOMOCRAFT |
%str.toUpperCase%VALUE% | Converts all of the characters in this String to upper case using the rules of the given Locale. | %str_toLowerCase%Momocraft% | momocraft |
%str_length%VALUE% | Returns the length of this string. | %string_length%Momocraft% | 9 |
%str_indexO%VALUE%CHAR% | Returns the index within this string of the first occurrence of the specified substring. | %str_indexOf%Momocraft%M% | 0 |
%str_lastIndexOf%VALUE%CHAR% | Returns the index within this string of the last occurrence of the specified character. | %str_lastIndexOf%Momocraft%t% | 8 |
%str_equals%VALUE%anotherString% | Compares this String to another String, ignoring case considerations. | ||
%str_equalsIgnoreCase%VALUE%anotherString% | Compares this String to another String, ignoring case considerations. | %str_equalsIgnoreCase%Momocraft%momocraft% | true |
%str_contains%VALUE%STRING% | Returns true if and only if this string contains the specified sequence of char values. | %str_contains%Momocraft%craf% | true |
%str_charAt%VALUE%INDEX% | Returns the char value at the specified index. An index ranges from 0 to length() - 1. | %str_charAt%Momocraft%3% | m |
%str_substring%VALUE%beginIndex% | Returns a new string that is a substring of this string. | %string_substring%Momocraft%4% | craft |
%str_substring%VALUE%beginIndex%endIndex% | Returns a new string that is a substring of this string. | %str_substring%Momocraft%5%%string.length%Momocraft% | craft |
%str_split%VALUE%REGEX% | Splits this string around matches of the given regular expression. | %str_split%1+2+3%+% | 123 |
Placeholder | Description | Example | Input | Output |
---|---|---|---|---|
<js>FORMULA</js> | Calculation formula. | <js>(%AMOUNT%/(9+1)*10)%10</js> | %AMOUNT%=11 | 1 |
<js>SCRIPT<var>VAR</js> | Execution script. | <js>var input='%VALUE%';" + "var output ='' ;" + "for (i = 0; i <= input.length; i++) { " + " output = input.charAt(i) + output" + "}<var>output</js> | %VALUE%=abcdefg | gfedcba |
<js>SCRIPT<var>VAR1, VAR2</js> | Execution script. | <js>var input='%VALUE%';" + "var output ='' ;" + "for (i = 0; i <= input.length; i++) { " + " output = input.charAt(i) + output" + "}<var>input, output</js> | %VALUE%=abcdefg | abcdefg, gfedcba |
More information: conditions
Placeholder | Description |
---|---|
%condition%CONDITION% | Checking if the the "Conditions" in condition.yml is matched. |
<if>CONDITION1<and>CONDITION2</if> | Checking if the the "CONDITION1" and "CONDITION2" both matched. |
<if>CONDITION1<or>CONDITION2</if> | Checking if the the "CONDITION1" or "CONDITION2" is matched. |
<if>CONDITION1<and>CONDITION2<or>CONDITION3</if> | Checking if the the "CONDITION1" and "CONDITION2" both matched or "CONDITION3" is matched. |
If the conditions are matched, executing the action.
The condition is the same format without "<if>" and "</if>".
Placeholder | Description |
---|---|
<action>CONDITION<true>ACTION</action> | |
<action>CONDITION<true>ACTION<false>ACTION2</action> | |
<action>CONDITION<false>ACTION</action> | |
<action>CONDITION<true>ACTION<elseif>CONDITION2<true>ACTION2<else>ACTION</action> |
Placeholder | Description |
---|---|
<action>CONDITION<true>ACTION</action> | |
<action>CONDITION<true>ACTION<false>ACTION2</action> | |
<action>CONDITION<false>ACTION</action> | |
<action>CONDITION<true>ACTION<elseif>CONDITION2<true>ACTION2<else>ACTION</action> |
Example | Input | Output |
---|---|---|
<action>%server_name%=survival<true>&a&lSurvival</action> | %server_name%=survival | &a&lSurvival |
<action>%server_name%=lobby<true>TRUE<false>FALSE</action> | %server_name%=lobby2 | false |
<action>%server_name%=lobby<false>FALSE</action> | %server_name%=lobby | |
<action>%server_name%=lobby<true><str_replace>%server_name%<var></str_replace>LOBBY%<elseif>%server_name%=survival<true>SURVIVAL<else>%server_name%=lobby2% | %server_name%=lobby2 | false |
Features | Available | Example |
---|---|---|
Spawn, Limit, Purge | entity | %entity_cave% |
Drop | player, entity | %player_cave% |
Damage | entity, target(=entity), trigger, player(=trigger) | %trigger_cave% |
Spawner | block, entity | %block_cave% |
Spawner | Description | Example |
---|---|---|
%spawner% | To type of spawner. | ZOMBIE |
%spawner_type_local% | The the local language of spawner type. | Zombie |
%new_spawner% | To type of new spawner. | CREEPER |
%new_spawner_type_local% | The the local language of spawner type. | Creeper |
%nearbyplayers% | The list of nearby players. | Momocraft, Steve |
Placeholder | Description | Example |
---|---|---|
%nick% | To get the input nick of player. | Momo |
%color% | To get color code of nick. | a |
Points | Description | Example |
---|---|---|
%points_balance% | The residence points. | 7000 |
%points_limit% | The limit of residence points. | 10000 |
%points_used% | The number of used residence points | 3000 |
%points_group% | The group or group of residence points | VIP |
%points_level% | The group or group of residence points | LV.10 |
%points_size% | The select residence size. | 125 |
%points_format% | The residence points' display name. Can be translate in CorePlus/config.yml. | points |
The value of placeholder %TARGET_inv%SLOT%
and %TARGET_inv_name%SLOT%
.
Slot type | Description | Values |
---|---|---|
Inventory | ⬈ | 0 ~ 35 |
Equipment | HEAD, CHEST, LEGS, FEET, HAND, OFF_HAND | |
Craft Table... | ⬈ | 0 ~ 3 |
Anvil... | ➞ | 0 ~ 2 |
Horse, Llama... | 0 |
Server website: momocraft.tw
(Not updated for a long time)
Discord: momocraft#9910
Spigot: https://www.spigotmc.org/members/momoservertw.496869/
MCBBS: https://www.mcbbs.net/home.php?mod=space&uid=2433271&do=thread&view=me&type=thread&from=space
GitHub: https://github.com/momoservertw