Skip to main content

⌨️ Skript

Overview​

Oraxen includes built-in Skript compatibility that loads automatically when Skript is present on the server. This allows you to use Oraxen items, custom blocks, and furniture directly in your scripts.

info

Skript 2.9+ is recommended for full compatibility. Skript and Oraxen have integrated successfully if you see this message in your console: Skript compatibility enabled - Oraxen syntax registered.

Syntax​

⚑️ Expressions​

Get Oraxen Item

Get an ItemStack from an Oraxen item ID.

oraxen item %string%
oraxen item from id %string%
give player oraxen item "ruby_sword"
set {_item} to oraxen item "emerald_pickaxe"
drop oraxen item "custom_helmet" at player's location
Get Oraxen ID

Get the Oraxen ID from an ItemStack, Block, Entity, or Location.

oraxen id of %itemstack/block/entity/location%
%itemstack/block/entity/location%'s oraxen id
set {_id} to oraxen id of player's tool
broadcast "Block ID: %oraxen id of clicked block%"
if oraxen id of target entity is "treasure_chest":
# do something
Get Oraxen Block

Get the Oraxen block ID at a location or block.

oraxen block at %location/block%
%location/block%'s oraxen block
set {_blockId} to oraxen block at player's location
if oraxen block at clicked block exists:
broadcast "This is an Oraxen block!"
Get Oraxen Furniture

Get the Oraxen furniture ID at a location, block, or from an entity.

oraxen furniture at %location/block/entity%
%location/block/entity%'s oraxen furniture
set {_furnitureId} to oraxen furniture at target entity
if oraxen furniture at clicked entity is "wooden_chair":
make player sit

❔ Conditions​

Is Oraxen Item

Check if an item is an Oraxen item.

%itemstack% is [an] oraxen item
%itemstack% is oraxen item %string%
%itemstack% is not [an] oraxen item
if player's tool is an oraxen item:
broadcast "You're holding a custom item!"

if player's tool is oraxen item "ruby_sword":
broadcast "You have the Ruby Sword!"
Is Oraxen Block

Check if a block is an Oraxen custom block.

%block/location% is [an] oraxen block
%block/location% is oraxen block %string%
%block/location% is not [an] oraxen block
if clicked block is an oraxen block:
cancel event

if block at player's location is oraxen block "ruby_ore":
broadcast "You found ruby ore!"
Is Oraxen Furniture

Check if an entity, block, or location is Oraxen furniture.

%entity/block/location% is [an] oraxen furniture
%entity/block/location% is oraxen furniture %string%
%entity/block/location% is not [an] oraxen furniture
if target entity is oraxen furniture:
broadcast "You're looking at furniture!"

if clicked entity is oraxen furniture "wooden_chair":
# handle chair interaction

πŸ—“οΈ Events​

All events support filtering by a specific Oraxen item ID using of "item_id".

Alternate phrasings are also registered, e.g. on break of oraxen block and on place of oraxen furniture. An "Oraxen Item ID" Skript type is registered as well.

Oraxen Block Break

Called when a player breaks an Oraxen custom block (NoteBlock or StringBlock).

on oraxen block break [of %string%]

Event values: event-player, event-block, event-string (the Oraxen ID)

on oraxen block break:
broadcast "%player% broke an Oraxen block: %event-string%"

on oraxen block break of "ruby_ore":
cancel event
send "You need a special pickaxe to mine this!" to player
Oraxen Block Place

Called when a player places an Oraxen custom block.

on oraxen block place [of %string%]

Event values: event-player, event-block, event-item, event-string

on oraxen block place:
broadcast "%player% placed an Oraxen block!"

on oraxen block place of "tnt_block":
cancel event
send "TNT blocks are disabled!" to player
Oraxen Block Interact

Called when a player interacts with an Oraxen custom block.

on oraxen block interact [of %string%]

Event values: event-player, event-block, event-item, event-string

on oraxen block interact of "magic_chest":
open virtual chest inventory to player
Oraxen Furniture Break

Called when a player breaks Oraxen furniture.

on oraxen furniture break [of %string%]

Event values: event-player, event-block, event-entity, event-string

on oraxen furniture break:
broadcast "%player% broke furniture: %event-string%"

on oraxen furniture break of "expensive_chair":
cancel event
send "You can't break this!" to player
Oraxen Furniture Place

Called when a player places Oraxen furniture.

on oraxen furniture place [of %string%]

Event values: event-player, event-block, event-entity, event-item, event-string

on oraxen furniture place of "lamp":
broadcast "A lamp was placed!"
Oraxen Furniture Interact

Called when a player interacts with Oraxen furniture.

on oraxen furniture interact [of %string%]

Event values: event-player, event-block, event-entity, event-item, event-string

on oraxen furniture interact:
broadcast "%player% interacted with furniture!"

on oraxen furniture interact of "treasure_chest":
give player diamond
send "You found treasure!" to player

πŸ”§ Effects​

Place Oraxen Block

Place an Oraxen custom block at a location.

place oraxen block %string% at %locations%
set oraxen block at %locations% to %string%
place oraxen block "ruby_ore" at player's location
place oraxen block "custom_stone" at {_locations::*}
Place Oraxen Furniture

Place Oraxen furniture at a location.

place oraxen furniture %string% at %locations%
spawn oraxen furniture %string% at %locations%
place oraxen furniture "wooden_chair" at player's location
spawn oraxen furniture "lamp" at {_location}
Remove Oraxen Block

Remove an Oraxen block at a location. The block's default drop is spawned unless a tool requirement prevents it.

remove oraxen block at %locations/blocks%
delete oraxen block at %locations/blocks%
remove oraxen block at player's location
remove oraxen block at clicked block
Remove Oraxen Furniture

Remove Oraxen furniture at a location or entity (without drops).

remove oraxen furniture at %locations/entities%
delete oraxen furniture at %locations/entities%
remove oraxen furniture at target entity
remove oraxen furniture at player's location

Example​

# Welcome players with a custom item
on join:
give player oraxen item "welcome_gift"
send "&aWelcome! You received a custom gift!"

# Custom wand effect
on right click:
if player's tool is oraxen item "magic_wand":
strike lightning at target block
send "&eZap!" to player

# Protect special blocks
on oraxen block break of "admin_block":
if player does not have permission "oraxen.admin":
cancel event
send "&cYou don't have permission to break this!" to player

# Custom furniture shop
on oraxen furniture interact of "shop_counter":
open virtual chest inventory with 3 rows named "&6Shop" to player
# Add shop items...

# Spawn furniture when placing a special item
on place of diamond block:
if player's tool is oraxen item "furniture_spawner":
cancel event
place oraxen furniture "diamond_statue" at event-block's location
remove 1 of player's tool from player

# Custom ore mining
on oraxen block break of "ruby_ore":
if player's tool is oraxen item "ruby_pickaxe":
give player oraxen item "ruby" with amount 3
else:
cancel event
send "&cYou need a Ruby Pickaxe to mine this!" to player

# Command to place furniture
command /placefurniture <text>:
permission: oraxen.placefurniture
trigger:
place oraxen furniture arg-1 at player's target block
send "&aPlaced %arg-1%!" to player

Troubleshooting​

warning

If Skript syntax doesn't work, ensure...

  • Skript is properly installed and enabled
  • You see the "Skript compatibility enabled" message in console
  • You're using Skript 2.9 or newer

Syntax not recognized

  • Reload Skript with /skript reload all
  • Check console for parsing errors
  • Verify Oraxen loaded successfully

Item ID not found

  • Ensure the Oraxen item exists in your configuration
  • Check for typos in the item ID
  • Item IDs are case-sensitive

Events not triggering

  • Verify the specific event exists (not all vanilla events trigger Oraxen events)
  • Check if the block/furniture is actually from Oraxen