Examples
Example configuration
info:
namespace: test
items:
script_executor:
name: script_executor
resource:
material: PAPER
generate: false
model_path: minecraft:item/diamond
events:
interact:
left:
script:
name: test:script_test
scripts:
script_test:
path: script_test.jspp
⏳ Delays
Use the delay(ticks, () -> { ... }) function to delay execution.
1 second = 20 ticks
📦 Importing Java Classes
You can import external classes using the import keyword with quotes:
❌ Cancelling The Event
You can cancel the current event using:
🔧 Utility Functions
🧱 ItemStack Utilities
🧍 Player Held Item
🧱 Block Utilities
💬 Messaging and Logging
Data Utility
Utility methods to save persistent data and read it later.
These methods support ItemStack, CustomItem, Entity and Block.
Examples
↺ Casting
Exactly how it works in Java.
📌 Best Practices
Use
delay()for animations or delayed feedback.Always check
isCustom()before modifying custom items or blocks.Log actions with
log()during debugging.Use
cancelEvent()to prevent default behavior when handling interactions.
Example: Replace near custom blocks
Last updated
Was this helpful?