Skip to content

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.2.0")
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
    var joinMessage = "{player_name} joined the server! His game mode is {game_mode}";
    joinMessage = PlaceholderAPI.getAPI().setPlaceholder(event.getPlayer(), joinMessage);
    event.setJoinMessage(joinMessage);
}

Built-in Placeholders

  • {x} x coordinate
  • {y} y coordinate
  • {z} z coordinate
  • {player_name} player's name
  • {player_display_name} player's display name
  • {health} player's health
  • {max_health} player's max health
  • {food_level} player's food level
  • {food_exhaustion_level} player's food exhaustion level
  • {food_saturation_level} player's food saturation level
  • {absorption} player's absorption amount
  • {air_supply_ticks} player's remaining air supply ticks
  • {air_supply_max_ticks} player's max air supply ticks
  • {on_fire_ticks} player's remaining fire ticks
  • {pitch} player's pitch
  • {yaw} player's yaw
  • {hand_item} player's item in hand
  • {offhand_item} player's item in offhand
  • {helmet_item} player's helmet item
  • {chestplate_item} player's chestplate item
  • {leggings_item} player's leggings item
  • {boots_item} player's boots item
  • {is_sneaking} whether player is sneaking
  • {is_sprinting} whether player is sprinting
  • {is_flying} whether player is flying
  • {is_swimming} whether player is swimming
  • {is_crawling} whether player is crawling
  • {is_gliding} whether player is gliding
  • {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.17.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