Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
MiniMessage Component-based Placeholders for Paper, Fabric, Sponge, Folia and Velocity platforms
MiniPlaceholders
MiniMessage Component-based Placeholders for Paper, Fabric, Sponge, Folia and Velocity platforms
Compatibility
- Paper 1.19.4+
- Folia 1.20+
- Velocity 3.2.0+
- Fabric 1.20+
- Sponge API 8+
Commands
Velocity
/vminiplaceholders parse me "[message with placeholders]"
/vminiplaceholders parse player [some-player] "[message with placeholders]"
Paper | Folia | Fabric | Sponge | Krypton
/miniplaceholders <parse|help> player [some-player] "[message with placeholders]
/miniplaceholders parse player [some-player] "[message with placeholders]"
Example:
/miniplaceholders parse me "<player_xp>"
/vminiplaceholders parse player 4drian3d "<player_name>"
User Usage
Check our user usage wiki
API
Check the available Javadocs
Or check the Developer Wiki
Java
class Main {
public static void registerExpansion() {
final Expansion expansion = Expansion.builder("my-expansion")
.filter(Player.class)
.audiencePlaceholder("name", (audience, ctx, queue) -> {
final Player player = (player) audience;
return Tag.selfClosingInserting(player.getName());
})
.globalPlaceholder("tps", (ctx, queue) ->
Tag.selfClosingInserting(Component.text(Bukkit.getTps()[0]))
).build;
expansion.register();
Player player;
final TagResolver playerResolver = MiniPlaceholders.getAudiencePlaceholders(player);
player.sendMessage(miniMessage().deserialize("Player Name: <my-expansion_name>", playerResolver));
}
}
Kotlin
fun register() {
val expansion = expansion("my-expansion") {
filter(Player::class.java)
audiencePlaceholder("name") { aud, _, _ ->
aud.getName().asClosingTag()
}
globalPlaceholder("tps") { _, _ ->
Component.text(Bukkit.getTps()[0]).asInsertingTag()
}
}
expansion.register()
val player: Player
val playerResolver = MiniPlaceholders.getAudiencePlaceholders(player)
player.sendMessage(miniMessage().deserialize("Player Name: <my-expansion_name>", playerResolver))
}
Information
Category | Admin Tools |
---|---|
Published on | March 4, 2023 |
License | Apache 2.0 |
Downloads | 597 |
Stars | 10 |
Watchers | 7 |
Supports Folia
Library
Pinned Versions
Pages
Members
Owner