Get the files on 9Minecraft
KubeJS includes several built-in utilities to simplify complex tasks.
Text and Chat
The Text utility allows for advanced chat formatting, including colors, click events, and hover tooltips.
* Text.green('Success!').bold
* Text.of('Click here').click('') (Note: External links are handled by the Minecraft client).
Scheduling
You can schedule tasks to run after a certain amount of time:
* server.scheduleInTicks(20, callback) - Runs code after 1 second (20 ticks).
NBT Handling
KubeJS provides full access to NBT (Named Binary Tag) data. You can read, modify, and write NBT to item stacks, entities, and block entities (like chests or furnaces).
Inventory and Items
- Item Stacks: Use
Item.of('id')to create item objects with custom NBT or counts. - Ingredients: Use
Ingredient.of('#tag')to refer to groups of items in recipes.











