promotional bannermobile promotional banner

LuaMine

A lightweight Lua scripting engine
Back to Files

1.3

File nameluamine-1.3.jar
Uploader
User447uiUser447ui
Uploaded
Aug 13, 2026
Downloads
8
Size
419.4 KB
File ID
8643565
Type
R
Release
Supported game versions
  • 1.21.11

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, plus json.save(name, table) / json.load(name) for persisting data to plugins/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.command now reliably reflect the latest script on every reload.
  • Fixed a chat-handling race condition — onChat now 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/sendMessage silently 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. Use registerFunction/registerModule to 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 /help even 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