Version: 0.7.0
All API changes to 0.7.X
The v0.7.X release contains the new Dynamic variable. To learn how to use them, see Dynamic Variables.
PlaceholderEntry Changes
- Old
- New
override fun display(player: Player?): String? {
return "Hello, ${player?.name ?: "World"}!"
}
override fun parser(): PlaceholderParser = placeholderParser {
supply { player ->
"Hello, ${player?.name ?: "World"}!"
}
}
The placeholder now returns a parser instead of directly parsing. This allows for more complex placeholders to be created. With sub placeholders, for example.
For example the TimedFact
returns the fact value by default for fact %typewriter_<entry id>%
.
But if you want the time when the fact will expire you can use %typewriter_<entry id>:time:expires:relative%
Where the :time:expires:relative
is a sub placeholder.