Examples
Example scripts for various things you can do with KubeJS
FTB Quests Integration
onEvent('ftbquests.custom_task.75381f79', event => { log.info('Custom task!') event.chec...
Reflection / Java access
Very limited reflection is possible, but is not recommended. Use it in cases when KubeJS doesnt s...
Painter API
About Painter API allows you to draw things on the screen, both from server and directly from cl...
Units
This page describes all functions and operations available for units Usage Most basic unit is p...
Network Packets
This script shows how to use network packets: // Listen to a player event, in this case item rig...
Starting Items
This server script adds items on first time player joins, checking stages. GameStages mod is not ...
FTB Utilities Rank Promotions
With this script you can have FTB Utilities roles that change over time. Is for 1.12 only. Requi...
Clearlag 1.12
This script removes all items from world every 30 minutes. Only works in 1.12. // Create item wh...
Scheduled Server Events
At server load, you can schedule anything to happen at later time. Within callback handler you ca...
Running Commands
Preface Sometimes, you might want to run a command (such as /tell @a Hi!), in your code. Most a...
Spawning Entities
Basics Overview Spawning entities consists of 3 steps: Making the variable storing the futur...