Kode 1.3.0 - Actions, Functions & Bug Fixes
Released 2026-03-20
New Actions
actionbar
Display a message in the action bar — the text that appears above the player's hotbar. Perfect for HUD prompts, status indicators, and non-intrusive notifications.
Code (Text):
on PlayerJoin:
actionbar "&aWelcome back, player.name!"
on BlockBreak:
load $coins from coins_player.name
actionbar "&6Coins: &e$coins"
heal / feed
Fully restore a player's health or hunger with a single keyword.
Code (Text):
command /heal:
heal
feed
send "&aYou have been healed and fed!" to player
give_xp
Give a player experience points directly from a script.
Code (Text):
on BlockBreak:
if $block_type == "diamond_ore":
give_xp 50
actionbar "&b+50 XP"
set_health / set_food
Set health or food to a precise value. Health is clamped between 0 and the player's max health. Food is clamped between 0 and 20.
Code (Text):
set_health 10
set_food 6
New Built-in Functions
Four new functions available anywhere an expression is valid.
- split(str, delim, index) — Split a string by a delimiter and return the element at index (0-based). Example: split("a,b,c", ",", 1) → b
- indexof(str, search) — Return the character index of search inside str, or -1 if not found
- isnumber(value) — Return true if value can be parsed as a number. Useful for validating command arguments
- format(number, decimals) — Format a number to N decimal places. Example: format(3.14159, 2) → 3.14
Code (Text):
command /pay:
if isnumber($arg1) == false:
send "&cUsage: /pay <amount>" to player
return
set $amount = $arg1
set $label = format($amount, 2)
send "&6Paid &e$label coins." to player
New player.* Properties
- player.op — true / false — whether the player is an operator
- player.flying — true / false — whether the player is currently flying
- player.max_health — the player's maximum health (default 20, may differ with attribute modifiers)
New Event Variables
Six events that previously had no injected variables now expose useful context:
- PlayerSneak — $sneaking (true when crouching, false when standing up)
- PlayerSprint — $sprinting (true when starting to sprint)
- PlayerToggleFlight — $flying (true when flight is being enabled)
- PlayerRespawn — $is_bed_spawn (true if respawning at a bed)
- PlayerMove — $to_x, $to_y, $to_z (destination block coordinates)
- ProjectileHit — $projectile_type, $shooter, $shooter_is_player
Code (Text):
on PlayerSneak:
if $sneaking == true:
actionbar "&7[Sneaking]"
on ProjectileHit:
if $shooter_is_player == true:
broadcast "&e$shooter fired a $projectile_type!"
Bug Fixes
- move action now works — The move action was parsed but never executed (silent no-op). It now correctly moves the player relative to their current position: move 0 1 0 lifts the player 1 block up.
- Storage write errors are now logged — If storage.yml could not be saved (e.g. disk full, permissions error), the failure was silently discarded. Kode now logs a warning so server admins can diagnose data-loss issues.
How to Update
- Stop your server.
- Replace kode-1.2.1.jar with kode-1.3.0.jar in your plugins/ folder.
- Start your server — no config changes needed.
Need help? Join the Discord or visit the documentation.