HimDSL – Complete Changelog (v1.0 – v4.0)
First release on PaperMC – This changelog covers all major features introduced since the very first version. 首次在 PaperMC 发布 – 此更新日志涵盖了从首个版本以来的所有主要功能。
v4.0 – Universal Event Listener & Mixed Paradigm
English
· Custom event listening – listen to any Bukkit native event with @EventHandler void func(event(AsyncPlayerChatEvent)); also listen to any third‑party plugin event by providing its full class path (e.g. @EventHandler void func(event("com.example.CustomEvent"))). The engine loads the class via Class.forName() at runtime. · Multi‑paradigm syntax – data structures now support both object‑oriented chaining (stack().push(10).push(20)) and procedural function calls (push(stack, 30)). All containers (stack, queue, map, vector, set) and strings can be used in either style. · Mutable strings – strings become modifiable like C‑style char[]. You can assign to an index: str[0] = 'h', even str[4] = 33 (ASCII), and the change applies to the original string. Works inside structs too. · File I/O – full file operations: fopen, fread, fwrite, fclose, fexists, fdelete, freadlines, fwritelines.
中文
· 自由事件监听 – 使用 @EventHandler void func(event(AsyncPlayerChatEvent)) 监听 Bukkit 原生事件;也支持监听任意第三方插件事件,只需提供完整类路径(如 @EventHandler void func(event("com.example.CustomEvent"))),引擎会在运行时通过 Class.forName() 加载。 · 多范式语法 – 数据结构同时支持面向对象的链式调用(stack().push(10).push(20))和过程式函数调用(push(stack, 30))。栈、队列、字典、向量、集合及字符串均可自由切换风格。 · 可变字符串 – 字符串可像 C 语言的 char[] 一样直接修改索引:str[0] = 'h',甚至 str[4] = 33(ASCII 码),修改直接影响原字符串,结构体内部同样支持。 · 文件操作 – 完整文件 API:fopen、fread、fwrite、fclose、fexists、fdelete、freadlines、fwritelines。
v3.1 – Command‑Line Arguments & Prime Checker Demo
English
· main function now accepts parameters – you can pass arguments when running /himdsl run .... · Fixed long‑standing bugs: player placeholders not working inside structs, and incorrect instance references for last‑block‑break/place and last‑command.
中文
· main 函数现在支持参数传递 – 运行 /himdsl run <文件> <参数1> <参数2> ... 即可传入。 · 修复了陈年 bug:玩家占位符在结构体内失效,以及“最后破坏/放置方块”和“最后命令”因实例引用错误而无法读取的问题。
v3.0 – Structs & Entity Selectors
English
· Structs – define custom data structures with struct keyword, e.g. struct Student { string name; int id; double math; }. · Entity selectors – @e and @A (note: case‑sensitive) now return built‑in Entity structs (or Entity[] for multiple). You can access fields like .type, .x, .y, .z directly. · @e supports the limit parameter; entities are only returned if their chunk is loaded.
中文
· 结构体 – 使用 struct 关键字自定义数据结构,例如 struct Student { string name; int id; double math; }。 · 实体选择器 – @e 和 @A(注意大小写)现在返回内置的 Entity 结构体(多个时返回 Entity[])。可直接访问 .type、.x、.y、.z 等字段。 · @e 支持 limit 参数,且仅当实体所在区块已加载时才会返回。
v2.4 – Big Numbers & New Containers (Vector, Set)
English
· Arbitrary‑precision arithmetic – bigAdd, bigSub, bigMul, bigDiv (with scale), and bigDivExact (throws if not divisible) – all based on BigDecimal, supporting numbers with hundreds of digits. · New containers – vector (dynamic array) and set (unique‑element collection) with methods add, remove, contains, size, and get (for vector).
中文
· 大数运算 – bigAdd、bigSub、bigMul、bigDiv(可指定小数位数)和 bigDivExact(不可整除时抛出异常)– 基于 BigDecimal,支持数百位的超大数字。 · 新容器 – vector(动态数组)和 set(无重复元素集合),提供 add、remove、contains、size 以及 get(仅 vector)等方法。
v2.1 – Task Life‑Cycle Control (start / stop)
English
· All event handlers and @BukkitRunnable tasks must now be explicitly started and stopped using start("funcName") and stop("funcName"). This gives fine‑grained control over which listeners are active. · Added himdsl debug off/on to toggle verbose debug logs. · If a task is started but not stopped and you need to terminate it without restarting the server, simply change start to stop in the script and run it again – it will stop the running instance.
中文
· 所有事件监听器和 @BukkitRunnable 定时任务现在必须通过 start("函数名") 和 stop("函数名") 显式启动和停止,从而实现精细的任务生命周期管理。 · 新增 himdsl debug off/on 用于开关详细的调试日志。 · 若任务已启动但未停止,且不想重启服务器,只需将脚本中的 start 改为 stop 再次运行即可停止正在运行的任务实例。
v2.0 – Event Listeners & @s Selector
English
· Event listeners – native support for Bukkit events with @eventhandler (note: lowercase) and event(EventClass). You can call event.setCancelled(true), event.getPlayer(), etc., exactly like in Java. · @s selector – inside event handlers, @s refers to the player who triggered the event (if applicable). · Example: @eventhandler void onChat(event(AsyncPlayerChatEvent)) { player p = @s; ... }
中文
· 事件监听器 – 原生支持 Bukkit 事件,使用 @eventhandler(注意全小写)和 event(事件类)。可像 Java 一样调用 event.setCancelled(true)、event.getPlayer() 等方法。 · @s 选择器 – 在事件处理函数中,@s 表示触发该事件的玩家(如果适用)。 · 示例:@eventhandler void onChat(event(AsyncPlayerChatEvent)) { player p = @s; ... }
v1.0 – Foundation: Virtual Machine, Containers, Placeholders & BukkitRunnable
English
· Core virtual machine – stable function call stack (up to ~300 layers) and string handling. · Built‑in containers – stack, queue, and map (dictionary). · @BukkitRunnable – scheduled tasks with interval declaration: @BukkitRunnable void task() sche=2s { ... }. Tasks run independently without needing to be called from main(). · Rich placeholders – player ($player(p,name)$, $player(p,x)$ etc.), world ($world(name)$, $world(block,x,y,z)$), server ($server(tps)$, $server(mspt)$), and random generators (rand(), rand(int,int), randChoose(...)). · runcmd(executor, command) – execute any server command as Console or a specific player. · Performance: recursive fib(25) (no memo) finishes in 0.6–0.8 s; stack depth up to 300 levels.
中文
· 核心虚拟机 – 稳定的函数调用栈(约 300 层)和字符串处理。 · 内置容器 – stack(栈)、queue(队列)和 map(字典)。 · @BukkitRunnable – 定时任务,支持周期声明:@BukkitRunnable void task() sche=2s { ... }。任务独立运行,无需在 main() 中调用。 · 丰富的占位符 – 玩家($player(p,name)$、$player(p,x)$ 等)、世界($world(name)$、$world(block,x,y,z)$)、服务器($server(tps)$、$server(mspt)$)以及随机数生成(rand()、rand(int,int)、randChoose(...))。 · runcmd(执行者, 命令) – 以控制台或指定玩家身份执行任意服务器命令。 · 性能:递归计算 fib(25)(无缓存)耗时 0.6~0.8 秒;栈深度可达 300 层。
Additional Highlights
English
· Tiny footprint – the compiled JAR is only ~0.5 MB (and the source JAR is ~80 KB), making it one of the lightest script plugins available. · Reflection‑based event binding – no pre‑compiled adapters; the plugin dynamically resolves event getters/setters via reflection, keeping the codebase minimal and version‑agnostic. · VS Code syntax highlighting – a configuration file is provided in the repository for better editing experience.
中文
· 极小的体积 – 编译后的 JAR 仅 约 0.5 MB(源码 JAR 约 80 KB),是目前最轻量的脚本插件之一。 · 基于反射的事件绑定 – 无需预编译适配器,插件通过反射动态解析事件的 getter/setter,使代码库极简且版本兼容性强。 · VS Code 语法高亮 – 仓库中提供了配置文件,提升编辑体验。
Note: This project is developed by a single student. For bugs or feature requests, please open an issue on GitHub – we reply promptly via email. 备注:本项目由一名学生单独开发。如有 Bug 或功能建议,请在 GitHub 上提交 Issue,我们会通过邮件及时回复。