The official placeholder api for Allay, inspired by the famous PAPI plugin for Spigot.
Note
This plugin is still under development and has not been released. If you are interested in using this plugin, please check out the latest build from our GitHub Actions page: Build Artifacts.
repositories {
mavenCentral()
maven("https://www.jitpack.io/")
maven("https://repo.opencollab.dev/maven-releases/")
maven("https://repo.opencollab.dev/maven-snapshots/")
maven("https://storehouse.okaeri.eu/repository/maven-public/")
}
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_type}
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.2.1+
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.