LuaCord
LuaCord 是一个现代化的插件框架,允许你使用 Lua 脚本并通过完整的 Spigot API 来创建 Minecraft 插件。现在支持 JAR 打包,便于分发!
功能特性
- 完整的 Spigot API - 可访问命令、事件、权限等
- JAR 支持 - 将插件打包为 .jar 文件以用于 CurseForge/Modrinth
- Web JAR 生成器 - 在 luacordmc.github.io/generator.html 将 .lkt 转换为 .jar
- 兼容 Paper - 在现代 Paper 服务器上完美运行
- 易于学习 - Lua 比 Java 简单得多
- 热重载 - 在开发模式下即时测试更改
- 向后兼容 - 所有 Lukkit 插件无需修改即可工作
安装方法
- 下载 LuaCord 并放入
/plugins/ 目录
- 将你的
.lkt 或 .jar 插件放入 /plugins/ 目录
- 重启服务器
创建插件
插件可以是:
.lkt 文件(ZIP 归档)- 用于开发
.jar 文件(JAR 包装器)- 用于在 CurseForge/Modrinth 上分发
- 文件夹 - 用于快速测试
每个插件包含:
main.lua - 你的插件代码
plugin.yml - 插件元数据
config.yml - 可选配置
示例插件:
plugin:onEnable(function()
logger:info("插件已启用!")
end)
plugin:addCommand({
name = "heal",
description = "治愈自身"
}, function(event)
local player = event:getSender()
player:setHealth(20)
player:sendMessage("已治愈!")
end)
plugin:registerEvent("PlayerJoinEvent", function(event)
local player = event:getPlayer()
player:sendMessage("欢迎!")
end)
plugin.yml:
name: MyPlugin
version: 1.0
main: main.lua
author: YourName
description: My awesome plugin
JAR 分发
想在 CurseForge 或 Modrinth 上分享你的插件吗?
- 创建你的
.lkt 插件
- 前往
- 上传你的
.lkt 并填写元数据
- 下载生成的
.jar 文件
- 上传至 CurseForge/Modrinth!
JAR 生成器完全在浏览器中运行——你的文件永远不会离开你的计算机。
命令
/luacord plugins - 列出已加载的 LuaCord 插件
/luacord dev reload <plugin> - 热重载开发模式插件
/luacord dev pack <plugin> - 将文件夹打包为 .lkt
/luacord dev unpack <plugin> - 将 .lkt 解压到文件夹
/luacord dev errors - 查看错误日志
配置
debug-mode: false # 详细日志记录
bypass-plugin-registration: true # Paper 兼容模式(推荐)
lua-debug: false # 启用 Lua 调试全局变量
依赖项
- Spigot 或 Paper(任意版本)
- Java 8 或更高版本
链接
- 官网:
- JAR 生成器:
- GitHub:
- 问题反馈:
许可协议
GPL v3
更新日志
0.2.6-BETA(当前版本)
打包修复
错误修复:
- 修复了 Jar 打包时包含无关的 Maven 构建库(Plexus Utils 和 Maven 编译器插件的依赖项),这导致 0.2.5 被 CurseForge 审核团队拒绝
更改:
- 移除了未使用的依赖项(
reflections、ebean)
- Jar 包大小从约 12 MB 减少至约 4 MB
- 对 Lua API 或插件行为无影响——现有的
.lkt 和 .jar 插件照常工作
0.2.5-BETA
稳定性与品牌重塑更新
错误修复:
- 修复了插件加载逻辑,防止一个损坏的
.lkt 插件无声地阻止其后列出的所有插件加载
- 修复了一个双重启用 bug,该 bug 可能导致以 JAR 形式分发的插件重复注册其事件监听器
- 修复了 JAR 生成器为某些插件描述生成损坏的
plugin.yml 文件的问题
更改:
- 将
/lukkit 命令重命名为 /luacord(权限也随之重命名——如果您曾显式授予 lukkit.command/lukkit.run,请重新授予 luacord.command/luacord.run)
0.2.0-BETA
JAR 支持发布!
新功能:
- JAR 插件包装器支持——以 .jar 文件形式分发插件
- luacordmc.github.io/generator.html 上的基于 Web 的 JAR 生成器
- 面向 JAR 包装器的公共 LuaCordAPI
- 改进了带有有用下载链接的错误提示
兼容性:
- 兼容所有 Lukkit 插件
- 完全向后兼容 .lkt 文件
- 适用于任何 Spigot/Paper 版本
- 需要 Java 8+
已知问题(当时):
- 由于兼容模式,
.lkt 插件在 Paper 上的 /plugins 命令中不显示——请改用 /luacord plugins。以 JAR 形式分发的插件可以正常显示。
- 热重载仅适用于文件夹形式的插件
0.1.0-BETA
LuaCord 初始发布
源自 Lukkit 2.2.0(亦由我制作),进行了重大改进:
- 使用 Kotlin 重写
- 清理控制台日志(不再出现类路径垃圾信息)
- 包名重命名为
io.thegamingmahi.luacord
- Paper 兼容性修复
- 绕过 Paper 限制的模式
- 改进的错误处理
LuaCord
LuaCord is a modern plugin framework that lets you create Minecraft plugins using Lua scripting with full Spigot API access. Now with JAR support for easy distribution!
Features
- Full Spigot API - Access to commands, events, permissions, and more
- JAR Support - Package plugins as .jar files for CurseForge/Modrinth
- Web JAR Generator - Convert .lkt to .jar at luacordmc.github.io/generator.html
- Paper Compatible - Works flawlessly on modern Paper servers
- Easy to Learn - Lua is much simpler than Java
- Hot Reload - Test changes instantly in dev mode
- Backwards Compatible - All Lukkit plugins work without changes
Installation
- Download LuaCord and place in
/plugins/
- Add your
.lkt or .jar plugins to /plugins/
- Restart your server
Creating Plugins
Plugins can be:
.lkt files (ZIP archives) - for development
.jar files (JAR wrappers) - for distribution on CurseForge/Modrinth
- Folders - for quick testing
Each plugin contains:
main.lua - Your plugin code
plugin.yml - Plugin metadata
config.yml - Optional configuration
Example plugin:
plugin:onEnable(function()
logger:info("Plugin enabled!")
end)
plugin:addCommand({
name = "heal",
description = "Heal yourself"
}, function(event)
local player = event:getSender()
player:setHealth(20)
player:sendMessage("Healed!")
end)
plugin:registerEvent("PlayerJoinEvent", function(event)
local player = event:getPlayer()
player:sendMessage("Welcome!")
end)
plugin.yml:
name: MyPlugin
version: 1.0
main: main.lua
author: YourName
description: My awesome plugin
JAR Distribution
Want to share your plugin on CurseForge or Modrinth?
- Create your
.lkt plugin
- Go to
- Upload your
.lkt and fill in metadata
- Download the generated
.jar
- Upload to CurseForge/Modrinth!
The JAR generator runs entirely in your browser - your files never leave your computer.
Commands
/luacord plugins - List loaded LuaCord plugins
/luacord dev reload <plugin> - Hot reload a dev plugin
/luacord dev pack <plugin> - Package folder as .lkt
/luacord dev unpack <plugin> - Unpack .lkt to folder
/luacord dev errors - View error logs
Configuration
debug-mode: false # Verbose logging
bypass-plugin-registration: true # Paper compatibility mode (recommended)
lua-debug: false # Enable Lua debug globals
Requirements
- Spigot or Paper (any version)
- Java 8 or higher
Links
- Website:
- JAR Generator:
- GitHub:
- Issues:
License
GPL v3
Changelog
0.2.6-BETA (Current)
Packaging Fix
Bug Fixes:
- Fixed the jar bundling unrelated Maven build libraries (Plexus Utils and the Maven compiler plugin's dependencies), which caused 0.2.5 to be rejected by CurseForge moderation
Changes:
- Removed unused dependencies (
reflections, ebean)
- Jar size reduced from about 12 MB to about 4 MB
- No changes to the Lua API or plugin behavior - existing
.lkt and .jar plugins work as before
0.2.5-BETA
Stability & Rebrand Update
Bug Fixes:
- Fixed plugin loading so one broken
.lkt plugin can no longer silently block every plugin listed after it from loading
- Fixed a double-enable bug that could cause JAR-wrapped plugins to register their event listeners twice
- Fixed the JAR generator producing broken
plugin.yml files for certain plugin descriptions
Changes:
- Renamed the
/lukkit command to /luacord (permissions renamed too - if you granted lukkit.command/lukkit.run explicitly, re-grant as luacord.command/luacord.run)
0.2.0-BETA
JAR Support Release!
New Features:
- JAR plugin wrapper support - distribute plugins as .jar files
- Web-based JAR generator at luacordmc.github.io/generator.html
- Public LuaCordAPI for JAR wrappers
- Improved error messages with helpful download links
Compatibility:
- Works with all Lukkit plugins
- Full backwards compatibility with .lkt files
- Any Spigot/Paper version
- Java 8+
Known Issues (at the time):
.lkt plugins don't show in /plugins on Paper due to bypass mode - use /luacord plugins instead. JAR-wrapped plugins do show up.
- Hot reload only works for folder-based plugins
0.1.0-BETA
Initial LuaCord Release
Forked from Lukkit 2.2.0 (Also By Me) with major improvements:
- Rewritten in Kotlin
- Clean console logging (no more class path spam)
- Package renamed to
io.thegamingmahi.luacord
- Paper compatibility fix
- Bypass mode for Paper restrictions
- Improved error handling
评论 0
登录后参与评分
还没有评论,来抢沙发吧