Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miniplaceholders/miniplaceholders
MiniMessage Component-based Placeholders for Paper, Fabric, Sponge, Folia and Velocity platforms
https://github.com/miniplaceholders/miniplaceholders
fabric-mod folia-plugin folia-plugins java kotlin krypton-plugin minecraft-api minecraft-mod minecraft-plugin minimessage paper-plugin placeholderapi sponge-plugin velocity-plugin
Last synced: 13 days ago
JSON representation
MiniMessage Component-based Placeholders for Paper, Fabric, Sponge, Folia and Velocity platforms
- Host: GitHub
- URL: https://github.com/miniplaceholders/miniplaceholders
- Owner: MiniPlaceholders
- License: apache-2.0
- Created: 2022-03-05T02:34:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T01:52:30.000Z (7 months ago)
- Last Synced: 2024-05-01T16:54:16.494Z (7 months ago)
- Topics: fabric-mod, folia-plugin, folia-plugins, java, kotlin, krypton-plugin, minecraft-api, minecraft-mod, minecraft-plugin, minimessage, paper-plugin, placeholderapi, sponge-plugin, velocity-plugin
- Language: Java
- Homepage: https://modrinth.com/plugin/miniplaceholders
- Size: 744 KB
- Stars: 61
- Watchers: 1
- Forks: 8
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# MiniPlaceholders
[![WorkFlow](https://img.shields.io/github/actions/workflow/status/MiniPlaceholders/MiniPlaceholders/build.yml?style=flat-square)](https://github.com/MiniPlaceholders/MiniPlaceholders/actions)
![Latest Version](https://img.shields.io/github/v/release/MiniPlaceholders/MiniPlaceholders?style=flat-square)
[![Discord](https://img.shields.io/discord/899740810956910683?color=7289da&logo=Discord&label=Discord&style=flat-square)](https://discord.gg/5NMMzK5mAn)
![Modrinth Downloads](https://img.shields.io/modrinth/dt/HQyibRsN?logo=Modrinth&style=flat-square)
![GitHub Downloads](https://img.shields.io/github/downloads/MiniPlaceholders/MiniPlaceholders/total?logo=GitHub&style=flat-square)MiniMessage Component-based Placeholders for Paper, Fabric, Sponge, Folia and Velocity platforms
## Compatibility
- Paper 1.19.3, 1.19.4+
- Folia 1.19.4+
- Velocity 3.1.2+
- Fabric 1.19.4+
- Sponge API 8+## Commands
### Velocity
- `/vminiplaceholders parse me "[message with placeholders]"`
- `/vminiplaceholders parse player [some-player] "[message with placeholders]"`### Paper | Folia | Fabric
- `/miniplaceholders player [some-player] "[message with placeholders]`
- `/miniplaceholders parse player [some-player] "[message with placeholders]"`#### Example:
- `/miniplaceholders parse me ""`
- `/vminiplaceholders parse player 4drian3d ""`## User Usage
Check our user usage wiki [here](https://github.com/MiniPlaceholders/MiniPlaceholders/wiki/User-Getting-Started)
## API
Check the available [Javadocs](https://javadoc.io/doc/io.github.miniplaceholders/miniplaceholders-api)
Or check the [Developer Wiki](https://github.com/MiniPlaceholders/MiniPlaceholders/wiki/Developer-Getting-Started)
### Java
```javaclass 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: ", playerResolver));
}
}```
### Kotlin
```kotlin
fun register() {
val expansion = expansion("my-expansion") {
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: ", playerResolver))
}
```