PlaceholderAPI is a powerful and flexible placeholder system for PocketMine-MP. It allows you to easily manage placeholders and dynamically replace them in messages, commands, and more. Whether you're creating a server with custom features or just want to improve the player experience, PlaceholderAPI has you covered!
- Dynamic Placeholder Replacement: Easily replace placeholders with values in messages, commands, and more.
- Custom Placeholder Support: Create and register your own placeholders.
- Advanced API: Provides a clean and simple API to integrate placeholders into your PocketMine-MP plugins.
- Download the latest release of PlaceholderAPI from the Releases page.
- Place the
.phar
file in theplugins/
directory of your PocketMine-MP server. - Start your server, and PlaceholderAPI will be automatically loaded.
%online_players%
: Shows the current number of online players.%max_players%
: Shows the maximum number of players allowed on the server.%server_name%
: Displays the name of the server.
For more detailed documentation and guides, please visit our wiki.
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%";
$processedText = PlaceholderAPI::getInstance()->processPlaceholders($player, $text);
$this->getLogger()->info(processedText); // Output: 5/100 (Example output)
We welcome contributions to PlaceholderAPI! If you'd like to help improve the plugin, feel free to fork the repository and create a pull request.