Placeholder & Expression
Last updated
Last updated
placeholder | value |
---|---|
placeholder | value |
---|---|
placeholder | value |
---|---|
Plugin doesn't support using PlaceholderAPI placeholders directly. But there's a section in config.yml where you can customize the identifier of a placeholder and use it almost everywhere.
Let's try the example below. Firstly make sure that you have installed PlaceholderAPI and Server Expansion.
Then you can use {date} in your items
Once you register a placeholder, you can use it almost everywhere in your plugin. For example, item properties, effects, NBT.
Example 1
① The probability of obtaining multiple loot increases.
② The fish will drop more experience points
③ Players can earn more from fishing every day
④ Players have less chance of getting rubbish from fishing
⑤ Players have more chance of getting quality fish
Example 2
This example requires you to install https://api.extendedclip.com/expansions/math/ & https://api.extendedclip.com/expansions/vault/
This example converts the money to integer format and displays the money the player would have if they sell the fish.
Then we could replace the old section in config.yml
placeholder | value |
---|---|
%cfcompetition_goingon%
true: there's a competition going on false: the opposite
%cfcompetition_nextseconds%
Get the countdown to the upcoming competition (Raw value)
%cfcompetition_nextsecond% %cfcompetition_nextminute% %cfcompetition_nexthour% %cfcompetition_nextday%
Get the countdown to the upcoming competition in days, hours, minutes, and seconds. (Formatted)
%cfcompetition_rank%
Get the rank in current competition
%cfcompetition_score%
Get the score in current competition
%cfcompetition_score_<rank>%
Get the score of the player in the specified ranking
%cfcompetition_player_<rank>%
Get the name of the player in the specified ranking
%cfcompetition_goal%
Get the competition goal
%cfcompetition_seconds%
Get the countdown for the current competition (Raw value)
%cfcompetition_second% %cfcompetition_minute% %cfcompetition_hour%
Get the countdown for the current competition in hours, minutes, and seconds. (Formatted)
%fishingstats_total%
Get the total amount of fish caught. This value might vary from the vanilla statistics because in CustomFishing you can disable statistics for certain loots.
%fishingstats_amount_<id>%
Get the total amount of a certain loot caught
%fishingstats_hascaught_<id>%
If player has caught a certain loot. Value: true / false
%fishingstats_category_total_<id>%
Get the total amount of fish caught that in a specified category.
%fishingstats_category_progress_<id>%
Get the unlock progress of the loots in specified category.
%fishingstats_size-record_<id>%
Get the size record of a certain loot
%customfishing_market_limit%
Get the market's sell limitation
%customfishing_market_earnings%
Get today's earnings
%customfishing_market_canearn%
Get the money that can be earned in the rest of the day
%customfishing_random%
Get random double value between 0-1
{second} {minute} {hour}
Get the countdown for the current competition in hours, minutes, and seconds.
{seconds}
Get the countdown for the current competition (Raw value)
{rank}
Get the rank in current competition
{score}
Get the score in current competition
{<rank>_player}
Get the name of the player in the specified ranking
{<rank>_score}
Get the score of the player in the specified ranking
{goal}
Get the competition goal
{loot}
Get the type of the loot
{id}
Get the internal ID
{record} {record_formatted}
Get the size record
{clicks}
Get the amount of clicks required in 'Click' game
{left_clicks}
Get the remaining amount of clicks in 'Click' game
{total_amount}
Get the number of fish caught
{progress}
Get the progress of the game
{nick}
Get the loot's nick
{score} {score_formatted}
Return the score of the fish if competition goal is total score.
Return the the size of the fish if comeptition goal is size related.
Return "1" if the competition goal is catch amount.
Return "0" if the loot doesn't have a score or there's no competition going on.
{custom_score}
This value if only available if the score is modified with API
{size} {size_formatted}
The size of the fish caught
{min_size} {max_size}
The min/max size of the fish
{price} {price_formatted}
The final price of the fish caught
{base}
The base price of the fish caught
{bonus}
The bonus
{x}
X coodinate
{y}
Y coodinate
{z}
Z coodinate
{other_x}
The other X coodinate
{other_y}
The other Y coodinate
{other_z}
The other Z coodinate
{world}
world
{player}
player
{near}
nearby player
{money} {money_formatted}
The money that can be earned from selling
{sold_item_amount}
The amount of sold items
{rest} {rest_formatted}
The rest of the money that can be earned in this day
{time_left}
Totem effective time / game time left
{0}
The unmodified weight
{rod}
Get the rod ID
{bait}
Get the bait ID
{hook}
Get the hook ID
{surrounding}
Get the environment the hook in
{random}
Get random double value between 0-1