Practical Examples
These examples use sample content from Obsidrel's Core. Resource IDs and player-data keys must exist in your installation. Save scripts in plugins/Skript/scripts/, then reload the relevant file with /sk reload <filename>.sk.
1. Give an Obsidrel item
command /obsidrelgive:
trigger:
if obsidrel has item "obsidrel:ruby":
obsidrel give item "obsidrel:ruby" to player
send "Ruby requested." to player
else:
send "Ruby definition not found." to player
2. Run a custom action
command /obsidrelaction:
trigger:
if obsidrel has action "obsidrel:ruby_pulse":
obsidrel execute action "obsidrel:ruby_pulse" for player
send "Action requested." to player
The confirmation message means a call was made; the configured Core action can still reject execution.
3. Save and read player data
command /obsidrelprofile:
trigger:
obsidrel set data "player_title" of player to "Skript Tester"
set {_title} to obsidrel player data "player_title" of player
send "Saved: %{_title}%" to player
Player Data persistence was tested across a full server restart with the Core's YAML storage.
4. Control a HUD and open a menu
command /obsidrelshowhud:
trigger:
obsidrel show hud "status" to player
command /obsidrelhidehud:
trigger:
obsidrel hide hud "status" from player
command /obsidrelshowcase:
trigger:
if obsidrel has menu "showcase":
obsidrel open menu "showcase" for player
5. Monitor cooldowns
command /obsidrelcooldown:
trigger:
if obsidrel cooldown "ruby_use" of player is ready:
send "Cooldown ready." to player
else:
send "Cooldown active or unavailable." to player
set {_ms} to obsidrel cooldown milliseconds "ruby_use" of player
send "Remaining: %{_ms}% ms" to player
This only reads cooldown state. Starting a cooldown requires an Obsidrel action or mechanism configured to acquire it. The tested 15-second release cooldown was provided by temporary Core test resources, not by the Skript command itself.
6. Protect a custom block
on obsidrel block break:
if obsidrel event id is "obsidrel:ruby_block":
cancel event
send "Skript blocked this custom block break." to event-player
7. Inspect furniture interactions
on obsidrel furniture interact:
send "Furniture ID: %obsidrel event id%" to event-player
Common rules
- Use exact IDs as configured in Obsidrel Core.
- Do not change native addon JARs while the server is running.
- Run mutating effects on the main thread, not inside Skript asynchronous sections.
- Reload scripts with
/sk reload, Core content with/obsidrel reload, and binaries with a full restart.