⌘K

Script Structure

Updated 16 Mar 2026

A .kode file can contain any mix of:

SectionDescription
on <EventName>:Runs automatically when a Minecraft event fires
command /name:Defines a custom in-game slash command
Top-level statementsRuns when you call /kode run <scriptname>
define <name>([params]):A reusable function definition
# This is a comment

on PlayerJoin:
    send "&aWelcome!" to player

send "&eServer restarted cleanly." to player

define greet($name):
    send "&bHello, $name!" to player