The official placeholder api for Allay, inspired by the famous PAPI plugin for Spigot.
repositories {
mavenCentral()
}
dependencies {
compileOnly(group = "org.allaymc", name = "papi", version = "0.1.0")
}@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
var joinMessage = "{player_name} joined the server! His game mode is {game_type}";
joinMessage = PlaceholderAPI.getAPI().setPlaceholder(event.getPlayer(), joinMessage);
event.setJoinMessage(joinMessage);
}There are a number of built-in placeholders that can be used once papi is installed:
-
{x}x coordinate -
{y}y coordinate -
{z}z coordinate -
{player_name}player's name -
{dimension}dimension name -
{dimension_id}dimension id -
{ping}player ping -
{date}date -
{time}time -
{datetime}date and time -
{year}year -
{month}month -
{day}day -
{hour}hour -
{minute}minute -
{second}second -
{mc_version}minecraft version -
{online}online player count -
{max_online}max online player count -
{address}player's address -
{runtime_id}player's runtime id -
{exp_level}player's experience level -
{exp_progress}player's experience progress -
{game_mode}player's game mode -
{xuid}player's xuid -
{uuid}player's uuid -
{device_os}os name of player's current device -
{locale}player's locale
Java: 21+
Allay: 0.8.0+
Contributions are welcome! Feel free to fork the repository, improve the code, and submit pull requests with your changes.
This project is licensed under the LGPL v3 License - see the LICENSE file for details.