By continuing to use this site, you agree to the Terms of Service of this website, including usage of cookies.

OK, Don't show this again

A powerful and flexible placeholder system for PocketMine-MP.
version 2.0.2
Approved
Direct Download How to install?
27 Downloads / 27 Total
2 Reviews
Plugin Description §

What is PlaceholderAPI

PlaceholderAPI is a powerful and flexible placeholder system for PocketMine-MP. It allows you to easily manage placeholders and dynamically replace them in messages. Whether you're creating a server with custom features or just want to improve the player experience, PlaceholderAPI has you covered!

Features

  • Dynamic Placeholder Replacement: Easily replace placeholders with values in messages.
  • Custom Placeholder Support: Create and register your own placeholders.
  • Cache Management: Efficient caching system to improve performance and reduce redundant processing.
  • Advanced API: Provides a clean and simple API to integrate placeholders into your PocketMine-MP plugins.

General Placeholders

Generals:

  • %online_players%: Shows the current number of online players (count(Server::getInstance()->getOnlinePlayers())).
  • %max_players%: Shows the maximum number of players allowed on the server (Server::getInstance()->getMaxPlayers()).
  • %server_motd%: Displays the server's Message of the Day (Server::getInstance()->getMotd()).
  • %server_version%: Displays the version of the server (Server::getInstance()->getVersion()).
  • %server_ip%: Shows the IP address of the server (Server::getInstance()->getIp()).
  • %server_port%: Displays the port the server is running on (Server::getInstance()->getPort()).
  • %player_name%: Shows the name of the player ($player->getName()).
  • %player_display_name%: Displays the display name of the player ($player->getDisplayName()).
  • %player_ping%: Shows the player's ping in milliseconds ($player->getNetworkSession()->getPing()).
  • %player_ip%: Displays the player's IP address ($player->getNetworkSession()->getIp()).
  • %player_health%: Shows the player's current health ($player->getHealth()).
  • %player_max_health%: Displays the player's maximum health ($player->getMaxHealth()).
  • %player_x%: Displays the player's X-coordinate ($player->getPosition()->getX()).
  • %player_y%: Displays the player's Y-coordinate ($player->getPosition()->getY()).
  • %player_z%: Displays the player's Z-coordinate ($player->getPosition()->getZ()).
  • %player_world%: Shows the name of the world the player is in ($player->getWorld()->getDisplayName()).
  • %server_time%: Displays the current server time in H:i:s format (date("H:i:s")).
  • %server_date%: Displays the current server date in Y-m-d format (date("Y-m-d")).
  • %random_number%: Generates and shows a random number between 1 and 100 (mt_rand(1, 100)).
  • %total_worlds%: Displays the total number of worlds loaded on the server (count(Server::getInstance()->getWorldManager()->getWorlds())).
  • %tps%: Shows the server's ticks per second rounded to two decimal places (round(Server::getInstance()->getTicksPerSecond(), 2)).
  • %uptime%: Displays the server's uptime in seconds since it started (round(microtime(true) - Server::getInstance()->getStartTime(), 2) . " seconds").

Wiki

For more detailed documentation and guides, please visit our wiki.

Placeholder Replacements

In your plugin or messages, you can use placeholders such as %online_players% and %max_players%. PlaceholderAPI will automatically replace them with the corresponding values.

$text = "%online_players%/%max_players%";
$player = $player;// If the player is not needed: $player = null;
$processedText = PlaceholderAPI::getInstance()->processPlaceholders($player, $text);
$this->getLogger()->info(processedText); // Output: 5/100 (Example output)

Pooyan-mr-3748
using v2.0.2
16 Jan 25
It is great. You have created an api
MohamadRZ4
16 Jan 25
Thank you:)
SoyDavs
using v2.0.2
05 Jan 25
A powerfull API bro. Congrats!!!
MohamadRZ4
07 Jan 25
Thanks!:D

Reply to review by :

/ 5
Supported API versions
5.0.0
->
5.16.0
Producers §
  • Collaborators:
    • @MohamadRZ4
License §
Categories:
General
Developer Tools
API plugins
Permissions
Other files

You can leave one review per plugin release, and delete or update your review at any time

/ 5
Loading...