1.3
What's new
LuaMine 1.3
A major stability and feature release. LuaMine has been through several beta cycles of hardening (memory leaks, thread-safety, a script watchdog) and a large batch of new scripting capabilities - this is the first release we're calling Stable.
Added
- Fluent command builder:
mc.command(name):execute():description():usage():tabComplete():permission():register()— adds tab-completion and permission-gated commands.mc.registerCommand(...)still works unchanged for simple cases. require("json")— encode/decode Lua tables to/from JSON, plusjson.save(name, table)/json.load(name)for persisting data toplugins/LuaMine/config/.- World interaction:
mc.setBlock(x, y, z, type),mc.getBlock(x, y, z),mc.spawnEntity(type, x, y, z). player:giveItem(item, amount),player:hasItem(item, amount).mc.hasPermission(sender, node).- 12 new events:
onPlayerDeath,onPlayerRespawn,onPlayerQuit,onBlockPlace,onEntityDeath,onInventoryClick,onWeatherChange,onWorldChange,onSneakToggle,onItemMend,onPickup,onDrop. - Script execution watchdog — aborts a script that hangs or infinite-loops instead of freezing the whole server.
Fixed
- Major memory leak on
/minelua reload— scheduled timers (Minecraft.wait) and registered commands used to keep running against the discarded script state after every reload, stacking up over time. Reloads now correctly replace them. - Commands registered via
mc.registerCommand/mc.commandnow reliably reflect the latest script on every reload. - Fixed a chat-handling race condition —
onChatnow runs safely on the main thread instead of racing every other script event. - Reduced GC pressure on frequent events (
onPlayerInteract,onBlockBreak) — player objects no longer reallocate their methods on every single call. - Fixed
Minecraft.getName/kick/sendMessagesilently failing (returning"Unknown"/ doing nothing) when called with a player object from an event callback. - Addons that depend on LuaMine (e.g.
require("re2")) are now guaranteed to be ready before scripts load for the first time, instead of racing plugin startup order.
Security
- Removed
LuaMineAPI.loadScript()— it allowed any installed plugin to inject arbitrary Lua source into LuaMine's environment with no validation of where that code came from. UseregisterFunction/registerModuleto expose Java functionality to scripts instead.
Known limitation
- A command, once registered at least once this server session, keeps tab-completing its name and showing up in
/helpeven after a script stops defining it — it correctly reports itself as unavailable if actually run, though. This is an intentional trade-off for reliable command updates on Paper.
This mod has no additional files

