Skip to content

The official placeholder api for Allay.

License

AllayMC/PlaceholderAPI

Repository files navigation

PlaceholderAPI

Maven Central Version

The official placeholder api for Allay, inspired by the famous PAPI plugin for Spigot.

Install

  • Download .jar file from release or action
  • Put it into plugins folder
  • Restart the server, enjoy!

Usages

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);
}

Built-in Placeholders

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

Requirement

Java: 21+

Allay: 0.8.0+

Contributing

Contributions are welcome! Feel free to fork the repository, improve the code, and submit pull requests with your changes.

License

This project is licensed under the LGPL v3 License - see the LICENSE file for details.

About

The official placeholder api for Allay.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages