Expressions Reference
The addon registers 7 expression patterns: three ItemStack constructors, one Player Data lookup, two duration expressions and one event identifier expression. A value can be absent if an ID does not resolve or the event has no relevant payload.
Complete reference
| Expression | Exact syntax | Type | Meaning |
|---|---|---|---|
| Custom item ItemStack | obsidrel item %string% | ItemStack | Creates a custom item from an existing item definition. |
| Custom block ItemStack | obsidrel block item %string% | ItemStack | Creates the item form of an existing custom block. |
| Furniture ItemStack | obsidrel furniture item %string% | ItemStack | Creates the item form of an existing furniture definition. |
| Player data | obsidrel player data %string% of %player% | String | Reads the serialized value of a player variable. |
| Cooldown duration | obsidrel cooldown milliseconds %string% of %player% | Number | Reads the remaining cooldown time in milliseconds. |
| Timer duration | obsidrel timer milliseconds %string% of %player% | Number | Reads remaining Player Data timer time in milliseconds. |
| Current event ID | [the] obsidrel event id | String | Returns the identifier carried by the current Obsidrel event. |
The optional [the] in [the] obsidrel event id means both obsidrel event id and the obsidrel event id can be parsed.
Read persistent player data
command /readobstitle:
trigger:
set {_title} to obsidrel player data "player_title" of player
send "Title: %{_title}%" to player
The bridge returns the text representation of the value. For typed arithmetic, validate and convert values in Skript as appropriate.
Read cooldown or timer duration
command /readobstime:
trigger:
set {_cd} to obsidrel cooldown milliseconds "ruby_use" of player
set {_timer} to obsidrel timer milliseconds "ruby_timer" of player
send "Cooldown: %{_cd}% ms" to player
send "Timer: %{_timer}% ms" to player
Cooldowns and Player Data timers are different Core systems. Do not assume that starting a timer also starts a cooldown. In the test setup, a ruby_timer_start action started a 30-second player timer; a separate test action started a 15-second cooldown.
Event identifier
on obsidrel block place:
send "Placed: %obsidrel event id%" to event-player
The result is the event's definition ID, variable key or other identifier, depending on event type. See the Events Reference.