GensCore
GensCore 是一款专为生存/阵营服务器 GensBien 开发的全面且面向生产的插件核心。它将所有必要的服务器机制整合进一个单一的高性能插件中,消除了管理数十个零散插件的复杂性和开销。原生针对运行在 Java 25 LTS 上的 PaperMC 和 Folia (Minecraft 26.1+) 进行工程优化!
官方文档网站: williambossard.github.io/GensCore
完整离线参考: 综合文档 (DOCUMENTATION.md).
包含功能(30 个模块)
GensCore 完全模块化,且无任何强制性的外部依赖:
- 双引擎数据库持久化: 开箱即用支持嵌入式 SQLite(WAL 模式),或连接远程 MySQL / MariaDB,配备 HikariCP 连接池、动态 SQL 方言转换,并在远程数据库不可达时自动安全回退至 SQLite。
- 经济系统、动态商店与拍卖行: 集中化的货币系统(
/money, /pay, /baltop)、基于数学供需模型的动态商店(/shop,涵盖 319 种生存物品)以及玩家间市场(/ah)。
- 公会与领地(队伍): 完整的公会系统(
/team),包括共享金库($ 或经验等级)、领土区块保护($16 \times 16$)、带有自定义颜色的实时 3D BlueMap 标记、10 套公会升级树、共享保险箱(/team vault)以及网页版名单管理。
- 职业与每日任务: 6 种职业(矿工、伐木工、猎人、农夫、渔夫、建筑师),具备防刷取区块缓存功能,并搭配每日轮换的任务系统(
/quests)。
- 单人任务奖励与精通: 个人进度系统,奖励已完成的任务(
/perks),解锁如即时 /autosmelt、5 格范围 /magnet 和额外出生点等能力。
- 容器安全与反破坏护盾: 容器锁定(
/lock, /lock guild)、反漏斗保护以及抗活塞推拉护盾。
- 网页面板与玩家门户: 由嵌入式 Javalin 提供服务的完全响应式 React 18 / Vite Web 应用程序,具备实时服务器遥测数据、控制台、玩家管理、模块开关以及交互式网页小游戏(大转盘、老虎机)。
- Discord 集成: 通过 JDA (Java Discord API) 实现双向同步,支持账号绑定(
!link)、聊天桥接和管理员操作嵌入消息。
- 跨平台基岩版就绪: 原生集成 Geyser & Floodgate,自动启用 Cumulus Forms 菜单、基岩版前缀以及高分辨率头像渲染。
- 多协议兼容性: 解耦的 ViaVersion 集成,检测客户端协议(
/check <player>),为旧版本映射材质,并提供 PlaceholderAPI 扩展。
- 死亡墓碑(坟冢)与实例化 Lootr: 全息显示的死亡墓碑,保留玩家的物品栏和经验;以及每个玩家独立的副本地牢宝箱。
- 系统遥测与管理: 游戏内健康监控(
/gens status, /gens db)和实时热插拔模块开关(/module)。
- 现代 MiniMessage 格式化: 纯 Kyori Adventure 风格的聊天和标签页样式,无需任何旧版格式化代码。
依赖项与集成
GensCore 设计为完全自主运行。它可以独立运行,无需任何强制性的外部插件,但能无缝集成到标准的服务器生态系统中:
推荐集成(软依赖项)
- Vault:
- 如果已安装 Vault: GensCore 会自动将其内部经济引擎注册到 Vault 的
Economy 服务提供者(GensVaultEconomy)。这使得您服务器上的任何其他第三方插件(如箱子商店、领地插件或拍卖行附加组件)能够无缝访问和修改 GensCore 的玩家余额。
- 如果未安装 Vault: GensCore 的经济系统将继续 100% 自主运行!所有内部经济功能(
/money, /balance, /baltop, /pay, /eco、动态商店和拍卖行)都会无中断地持久保存到本地 SQLite 数据库中。
- LuckPerms:
- 如果已安装 LuckPerms: GensCore 将集成 LuckPerms API,以获取玩家头衔、主组、权重和前缀,用于自定义聊天和记分板/名字标签。
- 如果未安装 LuckPerms: GensCore 会优雅地回退到默认的 Bukkit 权限检查(例如
genscore.admin)和标准显示名称。
可选集成
- GeyserMC & Floodgate: 如果您允许基岩版跨平台游玩,强烈建议安装。GensCore 会自动检测 Floodgate 以打开原生的基岩版表单(Cumulus API)、分配平台前缀(
[Bedrock])、解析基岩版 UUID/皮肤,并优化物品栏交互。
- ViaVersion & ViaBackwards: 多版本互操作桥接。自动检测客户端版本(例如 26.2, 1.21.x, 1.20.x),映射 26.3 菜单材质,提供
%genscore_client_version% 占位符,并启用 /check <player> 管理员命令。
- BlueMap: 如果已安装,网页面板将为管理员集成实时地图视图。
- PlaceholderAPI: 与官方
GensCoreExpansion 集成(%genscore_balance%, %genscore_client_version%, %genscore_guild% 等)。
兼容性:仅限 Paper 与 Folia
GensCore 严格兼容 PaperMC 和 Folia(Minecraft 26.1+,Java 25+)。
它不会在标准的传统 Spigot 服务器上启动。该插件依赖于现代 Paper API,包括用于文本组件的 Kyori Adventure (MiniMessage)、区域多线程 Folia 调度器 (FoliaLib),以及用于 Paper 的 Cloud Command Framework。
配置与网络(端口)
为了避免硬编码的秘密或地址,GensCore 依赖位于 plugins/GensCore/ 中的模块化配置系统。主 config.yml 处理核心设置(数据库、语言),而 modules/ 文件夹包含每个功能的特定文件。
Web 面板
Web 管理面板在 Minecraft 服务器本地运行,与游戏一起使用 Javalin。它使用 Vite 和 React 构建,提供完全响应式的移动友好体验。
- 默认端口为 8080。
- 可以通过
modules/web.yml 中的 port: 8080 选项进行修改。
- 如果您的 Minecraft 服务器托管在主机上(如 Pterodactyl),您需要打开第二个空闲端口并在配置中指定它,以便 Web 面板可访问。
Web 面板安全(管理员密码):
默认情况下,密码设置为 "gens"。首次启动时,GensCore 将使用 BCrypt 自动将此密码哈希化并存储在 web.yml 中以确保安全。如果您忘记了密码,只需打开 modules/web.yml,用新的纯文本密码替换长哈希字符串,然后重启服务器。插件将自动再次对其进行哈希化处理。
Discord 机器人
Discord 模块需要机器人令牌。出于安全原因,此令牌绝不应共享或硬编码在 Java 源代码中。
- 通过
modules/discord.yml 中的 bot_token: "YOUR_TOKEN" 选项提供。
- 该机器人通过在 Minecraft 服务器停止之前正确断开其 WebSocket 连接,确保服务器干净地关闭,而不会抛出
zip file closed 错误。
数据库引擎
GensCore 使用由 HikariCP 管理的双引擎数据库层:
- SQLite(默认): 无需设置。所有数据都保存在本地的
plugins/GensCore/genscore.db 中。
- MySQL / MariaDB(可选): 可在
config.yml 中激活 (database.type: "mysql")。适用于外部数据库或容器化设置。
- 自动回退: 如果外部数据库服务器不可达或离线,GensCore 会自动回退到本地 SQLite,而不会中断服务器启动。
database:
type: "sqlite" # "sqlite" 或 "mysql"
sqlite:
file: "genscore.db"
mysql:
host: "127.0.0.1"
port: 3306
database: "genscore"
username: "genscore_user"
password: "change_me"
内部代码架构
对于希望修改或理解插件的开发人员,以下是其内部架构的支柱:
ModuleManager:这是核心系统。GensCore 不是一个单体插件,而是分为数十个“模块”(如 EconomyModule、TeamsModule、DiscordModule)。它们都继承自 Module 接口,并且可以动态启用或禁用。
- 数据库引擎 (
DatabaseManager.java):默认情况下,GensCore 使用带有 HikariCP 连接池的本地 SQLite 数据库 (genscore.db)。可以启用可选的外部 MySQL/MariaDB 数据库,具有自动模式迁移、SQL 方言翻译 (adaptQuery) 以及在连接失败时弹性自动回退到 SQLite 的功能。
- REST Web API (
WebManager.java & WebPlayerAPI.java):Javalin 在后台用于在端口 8080 上启动 HTTP 微服务器。/web-panel 文件夹中的 React 代码被构建并放置在 /src/main/resources/public/ 中。每当管理员访问网页时,Javalin 都会提供这些 HTML/JS 文件,并通过 JSON API 与 React 通信。
- 指标与健康服务 (
MetricsService.java):收集实时 JVM 遥测数据、Folia 刻率、数据库连接池统计信息以及通过 /api/metrics 和游戏内命令暴露的活动模块状态。
- 命令引擎与 Cloud 补丁 (
CommandManager.java):由 Incendo Cloud Command Framework 驱动,具有异步协调和 Brigadier 建议功能。包括一个架构补丁 (ItemStackParser.java),以确保在 Paper 26.3 上直到 Cloud 2.1+ 发布前,项目参数解析完美无缺。
构建与安装
如果您想编译 GensCore,理想的环境是 Java 25,由 Maven 和 Node.js/npm(用于 Web 面板)管理。
手动构建(本地)
git clone https://github.com/WilliamBossard/GensCore.git
cd GensCore
# 首先,构建 Web 面板
cd web-panel
npm install
npm run build
cd ..
# 然后,打包 Java 插件
mvn clean package -DskipTests
最终文件将位于 target/GensCore-1.0.3.jar。
通过 GitHub Actions 构建
GensCore 有一个配置的 Workflow(在 .github/workflows/release.yml 中)。
- 进入您的 GitHub 仓库,在 “Actions” 标签页。
- 在左侧选择 “Build and Release GensCore”。
- 点击 “Run workflow”。
- GitHub 将在几秒内在其服务器上编译项目(包括 React 面板和 Java 插件)(免费),然后创建一个 Draft Release。
- 您所要做的就是从 GitHub Release 下载
.jar 文件,无需在计算机上安装 Java、Maven 或 Node.js!
Plugin developed with passion for GensBien.
语言支持
GensCore 完全支持多种语言。活动语言在 config.yml 中设置:
lang: fr_FR # 或 en_US
可用的语言文件位于 plugins/GensCore/lang/。每个文件包含所有面向玩家的消息,可以自由定制。开箱即用的支持语言:
| Code |
Language |
fr_FR |
French |
en_US |
English |
自动更新检查器
在服务器启动时,以及当拥有 genscore.admin 权限(或拥有操作员状态)的玩家加入服务器时,GensCore 会自动在 GitHub 上检查是否有新版本发布。
- 如果有新版本可用,会在 聊天 中发送通知(仅管理员/操作员可见),并将信息记录到 服务器控制台。
- 该检查是非阻塞的,并以异步方式运行,以避免对启动时间造成任何影响。
- 已安装的版本会与最新的 GitHub Release 标签进行比较(例如
1.0.0 对比 1.0.1)。
命令与权限
认证
| 命令 |
权限 |
描述 |
/register <password> <confirm> |
— |
注册你的账户(通过 BCrypt 进行哈希处理) |
/login <password> |
— |
登录你的账户 (别名: /l) |
/changemdp <old> <new> |
— |
更改你的账户密码 (别名: /changepassword) |
/resetmdp <player> |
genscore.admin |
强制重置某玩家的密码 |
经济、动态商店 & 拍卖行
| 命令 |
权限 |
描述 |
/money |
— |
查看你当前的余额 (别名: /balance) |
/money <player> |
genscore.admin |
查看其他玩家的余额 |
/baltop |
— |
显示服务器余额排行榜 |
/pay <player> <amount> |
— |
向另一位在线玩家转账 |
/eco <set|give|take|reset> |
genscore.admin |
管理玩家余额 |
/shop |
— |
打开动态数学公式服务器商店 GUI |
/ah |
— |
打开拍卖行市场 (别名: /hdv) |
/ah sell <price> |
— |
将手中物品上架至拍卖行 |
公会 & 氏族 (/team)
| 命令 |
权限 |
描述 |
/team |
— |
打开公会管理 GUI (别名: /guild, /teams) |
/team create <name> |
— |
创建新公会(最多 16 个字符) |
/team invite <player> |
— |
邀请玩家加入(需为管理员/首领) |
/team accept |
— |
接受待处理的公会邀请 |
/team kick <player> |
— |
将成员踢出公会(需为管理员/首领) |
/team promote/demote |
— |
晋升为管理员或降职为普通成员(需为首领) |
/team leave |
— |
离开当前公会(首领必须先解散公会) |
/team disband |
— |
永久解散公会并释放领地声明 |
/team quest |
— |
打开每周合作公会任务菜单 |
/team upgrades |
— |
打开包含 10 项公会增益升级的商店 |
/team sethome / /team home |
— |
设置或传送至共享的公会信标点 |
/team vault |
— |
打开公会公共虚拟箱子 (别名: /team coffre, /team chest) |
/team deposit/withdraw |
— |
从公会银行存取美元 ($) |
/team depositxp/withdrawxp |
— |
从公会银行存取经验等级 |
/team claim / /team unclaim |
— |
声明或取消声明当前区块($16 \times 16$) |
/team color <#hex> |
— |
在 BlueMap 上设置公会领地标记颜色 |
职业、每日任务 & 单人增益
| 命令 |
权限 |
描述 |
/jobs |
— |
打开职业与专业菜单 (别名: /job) |
/quests |
— |
打开每日任务菜单 (别名: /quest, /quete) |
/perks |
— |
打开单人任务增益 GUI (别名: /bonus, /passe) |
/autosmelt |
— |
切换原矿自动熔炼功能(开/关) |
/magnet |
— |
切换 5 格地面物品吸附磁铁功能(开/关) |
传送与导航
| 命令 |
权限 |
描述 |
/spawn |
genscore.spawn |
传送至世界出生点 |
/setspawn |
genscore.admin |
设置全局服务器出生点位置 |
/sethome [name] |
genscore.home |
设置个人家宅信标点 |
/home [name] |
genscore.home |
传送至个人家宅信标点 |
/delhome [name] |
genscore.home |
删除个人家宅信标点 |
/back |
genscore.back |
返回至上一次死亡或传送的位置 |
/tpa <player> |
genscore.tpa |
向某玩家发送传送请求 |
/tpaccept |
genscore.tpa |
接受传入的传送请求 |
/tpdeny / /tpadeny |
genscore.tpa |
拒绝传入的传送请求 |
/tpacancel |
genscore.tpa |
取消你发出的传送请求 |
容器安全与锁
| 命令 |
权限 |
描述 |
/lock [private] |
— |
锁定一个容器(箱子、 barrel、熔炉、潜影盒) |
/lock unlock |
— |
移除你容器上的锁 |
/lock guild |
— |
与所有公会成员共享容器访问权限 |
生存实用工具
| 命令 |
权限 |
描述 |
/ec [player] |
genscore.ec |
打开虚拟末影箱 (别名: /enderchest) |
/craft |
genscore.craft |
打开虚拟 3x3 工作台 (别名: /workbench) |
/anvil |
genscore.anvil |
打开虚拟铁砧 |
/enchant |
genscore.enchant |
打开虚拟附魔台 (别名: /enchanttable) |
/feed |
genscore.feed |
满足饥饿值 |
工作人员与 Moderation
| 命令 |
权限 |
描述 |
/ban <player> [time] [reason] |
genscore.ban |
永久或暂时封禁某玩家 |
/unban <player> |
genscore.ban |
解封某玩家 |
/mute <player> [time] [reason] |
genscore.mute |
在某玩家的公共聊天中禁言 |
/unmute <player> |
genscore.mute |
解除某玩家的禁言 |
/kick <player> [reason] |
genscore.kick |
将在线玩家踢出服务器 |
/freeze <player> |
genscore.freeze |
冻结某玩家以便进行屏幕共享检查 |
/openinv <player> |
genscore.openinv |
实时检查背包与装备 (别名: /invsee) |
/check <player> |
genscore.check |
技术档案(基岩版/Java版、版本、延迟、坐标)(别名: /whois) |
Discord 与网页赌场桥接
| 指令 |
权限 |
描述 |
/discord link |
— |
生成用于 Discord (!link <code>) 的 6 位链接码 |
/discord reg |
— |
显示 Discord 链接说明及邀请链接 |
/web |
— |
网页赌场存款库存的帮助信息 |
/web deposit |
— |
将手中物品存入网页赌场投注库存 |
/web withdraw |
— |
从网页老虎机中取回获胜的物品 |
管理与诊断
| 指令 |
权限 |
描述 |
/gens status |
genscore.admin |
实时遥测数据:平台、JVM 内存、CPU 负载、Folia TPS、活跃模块 |
/gens db |
genscore.admin |
实时数据库状态:存储引擎(SQLite/MySQL)和 HikariCP 连接池统计 |
/module <name> <on|off> |
genscore.admin |
在运行时动态切换任意一个模块(共 30 个) |
/menu [name] |
— |
从 plugins/GensCore/menus/ 打开自定义 YAML 库存菜单 |
/spawner give <player> <type> |
genscore.admin.spawner |
给予自定义堆叠智能刷怪箱方块 |
注意: 拥有操作员权限(/op)的玩家会自动继承 genscore.admin 权限。
如需查看所有 30 个模块的完整列表、高级子命令、绕过权限以及开箱即用的 LuckPerms 模板,请参阅 DOCUMENTATION.md 和 在线文档。
Lootr 集成
GensCore 将自定义的类 Lootr 系统(基于玩家独立的战利品箱子)完全集成到核心中,这意味着你无需安装任何外部模组或插件。箱子数据和基于玩家的独立战利品库存会持久化存储在配置的数据库中(SQLite 或 MySQL,分别在 lootr_chests 和 lootr_player_chests 表中)。如果在启动时检测到旧的 chests.yml 文件,它将被自动且透明地迁移。
你可以在 modules/lootr.yml 文件中配置其行为:
lootr:
prevent-hopper: true
prevent-break: false
particles-enabled: true
break-confirm-time: 3
服务器重置
[!WARNING]
此操作不可逆。 服务器重置会从数据库中永久删除所有玩家数据(包括家园、经济、统计、认证、任务等)。它不会删除世界文件。
Web 管理面板在配置页面底部包含一个“清除服务器数据”按钮。为防止误操作:
- 该按钮以醒目的红色标记。
- 点击它需要输入 管理员密码 进行确认。
- 清除完成后,控制台将记录一条确认消息。
要从控制台执行清除操作,必须确保 Web 面板正在运行并可访问。
GensCore
GensCore is a comprehensive, production-ready core plugin developed specifically for the Survival/Faction server GensBien. It bundles all essential server mechanics into a single, high-performance plugin, eliminating the complexity and overhead of managing dozens of fragmented plugins. Engineered natively for PaperMC and Folia (Minecraft 26.1+) running on Java 25 LTS!
Official Documentation Website: williambossard.github.io/GensCore
Full offline reference: Comprehensive Documentation (DOCUMENTATION.md).
Included Features (30 Modules)
GensCore is 100% modular with zero mandatory external dependencies:
- Dual-Engine Database Persistence: Runs out of the box on embedded SQLite (WAL mode) or connects to remote MySQL / MariaDB with HikariCP pooling, dynamic SQL dialect translation, and automatic safe fallback to SQLite if remote DB is unreachable.
- Economy, Dynamic Shop & Auction House: Centralized currency (
/money, /pay, /baltop), dynamic mathematical supply/demand shop (/shop, 319 survival items), and player-to-player marketplace (/ah).
- Guilds & Claims (Teams): Complete clan system (
/team) featuring shared treasury ($ or XP levels), territory chunk protection ($16 \times 16$), real-time 3D BlueMap markers with custom colors, 10 team upgrade trees, shared vaults (/team vault), and web roster administration.
- Jobs & Daily Quests: 6 professions (Miner, Lumberjack, Hunter, Farmer, Fisherman, Builder) with anti-farm block caching, paired with a daily rotating quest system (
/quests).
- Solo Quest Perks & Masteries: Individual progression rewarding completed quests (
/perks), unlocking abilities like instant /autosmelt, 5-block /magnet, and extra homes.
- Container Security & Grief Shield: Container locking (
/lock, /lock guild), anti-hopper protection, and anti-piston push/retraction shields.
- Web Panel & Player Portal: Fully responsive React 18 / Vite web application served by embedded Javalin, featuring live server telemetry, console, player management, module toggles, and interactive web minigames (Wheel of Fortune, Casino Slots).
- Discord Integration: Two-way synchronization via JDA (Java Discord API) with account linking (
!link), chat bridge, and staff action embeds.
- Cross-Play Bedrock Ready: Native Geyser & Floodgate integration with automatic Cumulus Forms menus, Bedrock prefixes, and high-res avatar rendering.
- Multi-Protocol Compatibility: Decoupled ViaVersion integration detecting client protocols (
/check <player>), mapping materials for legacy versions, and providing PlaceholderAPI expansions.
- Death Graves (Tombs) & Instanced Lootr: Holographic player graves preserving inventory/XP and per-player instanced dungeon chests.
- System Telemetry & Administration: In-game health monitoring (
/gens status, /gens db) and live hot-swappable module toggling (/module).
- Modern MiniMessage Formatting: Pure Kyori Adventure chat and tablist styling with zero legacy formatting codes.
Dependencies & Integrations
GensCore is designed to be fully autonomous. It can run standalone without requiring any mandatory external plugins, but seamlessly integrates with the standard server ecosystem:
Recommended Integrations (Soft Dependencies)
- Vault:
- If Vault is installed: GensCore automatically registers its internal economy engine into Vault's
Economy service provider (GensVaultEconomy). This enables any other 3rd-party plugins on your server (like chest shops, claim plugins, or auction addons) to seamlessly access and modify GensCore player balances.
- If Vault is NOT installed: GensCore's economy continues to work 100% autonomously! All internal economy features (
/money, /balance, /baltop, /pay, /eco, Dynamic Shop, and Auction House) persist to the local SQLite database without interruption.
- LuckPerms:
- If LuckPerms is installed: GensCore integrates with the LuckPerms API to fetch player ranks, primary groups, weights, and prefixes for the custom Chat and Scoreboard/Nametags.
- If LuckPerms is NOT installed: GensCore gracefully falls back to default Bukkit permission checks (e.g.
genscore.admin) and standard display names.
Optional Integrations
- GeyserMC & Floodgate: Highly recommended if you allow Bedrock cross-play. GensCore automatically detects Floodgate to open native Bedrock Forms (Cumulus API), assign platform prefixes (
[Bedrock]), resolve Bedrock UUIDs/skins, and optimize inventory interactions.
- ViaVersion & ViaBackwards: Multi-version interop bridge. Automatically detects client versions (e.g. 26.2, 1.21.x, 1.20.x), maps 26.3 menu materials, supplies
%genscore_client_version% placeholders, and enables the /check <player> staff command.
- BlueMap: If installed, the web panel integrates a live map view for administrators.
- PlaceholderAPI: Integrated with the official
GensCoreExpansion (%genscore_balance%, %genscore_client_version%, %genscore_guild%, etc.).
Compatibility: Paper & Folia Only
GensCore is STRICTLY compatible with PaperMC and Folia (Minecraft 26.1+, Java 25+).
It will not start on a standard legacy Spigot server. The plugin relies on modern Paper APIs such as Kyori Adventure (MiniMessage) for text components, regional multi-threaded Folia schedulers (FoliaLib), and the Cloud Command Framework for Paper.
Configuration & Networks (Ports)
To avoid hardcoded secrets or addresses, GensCore relies on a modular configuration system located in plugins/GensCore/. The main config.yml handles core settings (database, language), while a modules/ folder contains specific files for each feature.
Web Panel
The Web administration panel runs locally on your Minecraft server, alongside the game, using Javalin. It has been built with Vite and React for a fully responsive mobile-friendly experience.
- The default port is 8080.
- It can be modified via the
port: 8080 option in modules/web.yml.
- If your Minecraft server runs on a host (like Pterodactyl), you will need to open a second free port and specify it in the configuration for the Web Panel to be accessible.
Web Panel Security (Admin Password):
By default, the password is set to "gens". Upon the first startup, GensCore will automatically hash this password in web.yml using BCrypt to secure it. If you forget your password, simply open modules/web.yml, replace the long hashed string with a new password in plain text, and restart the server. The plugin will automatically hash it again.
Discord Bot
The Discord module requires a bot Token. For security reasons, this Token must never be shared or hardcoded in the Java source code.
- Provide it via the
bot_token: "YOUR_TOKEN" option in modules/discord.yml.
- The bot ensures clean server shutdowns without throwing
zip file closed errors by disconnecting its WebSockets properly before the Minecraft server halts.
Database Engine
GensCore uses a dual-engine database layer managed by HikariCP:
- SQLite (Default): Zero setup required. All data is saved locally in
plugins/GensCore/genscore.db.
- MySQL / MariaDB (Optional): Can be activated in
config.yml (database.type: "mysql"). Ideal for external databases or containerized setups.
- Automatic Fallback: If the external database server is unreachable or offline, GensCore automatically falls back to local SQLite without interrupting server startup.
database:
type: "sqlite" # "sqlite" or "mysql"
sqlite:
file: "genscore.db"
mysql:
host: "127.0.0.1"
port: 3306
database: "genscore"
username: "genscore_user"
password: "change_me"
Internal Code Architecture
For developers wishing to modify or understand the plugin, here are the pillars of its internal architecture:
- The
ModuleManager: This is the core system. Instead of being a monolithic plugin, GensCore is divided into dozens of "Modules" (such as EconomyModule, TeamsModule, DiscordModule). They all inherit from the Module interface and can be dynamically enabled or disabled.
- Database Engine (
DatabaseManager.java): By default, GensCore uses a local SQLite database (genscore.db) with HikariCP connection pooling. An optional external MySQL/MariaDB database can be enabled with automatic schema migration, SQL dialect translation (adaptQuery), and resilient automatic fallback to SQLite upon connection failure.
- REST Web API (
WebManager.java & WebPlayerAPI.java): Javalin is used in the background to spin up an HTTP micro-server on port 8080. The React code in the /web-panel folder is built and placed into /src/main/resources/public/. Every time an admin visits the web page, Javalin serves these HTML/JS files and communicates with React via a JSON API.
- Metrics & Health Service (
MetricsService.java): Collects real-time JVM telemetry, Folia tick rate, database connection pool statistics, and active module status exposed via /api/metrics and in-game commands.
- Command Engine & Cloud Patch (
CommandManager.java): Powered by the Incendo Cloud Command Framework with asynchronous coordination and Brigadier suggestions. Includes an architecture patch (ItemStackParser.java) to ensure flawless item argument parsing on Paper 26.3 until Cloud 2.1+ is released.
Build & Installation
If you wish to compile GensCore, the ideal environment is Java 25, managed by Maven and Node.js/npm (for the web panel).
Manual Build (Local)
git clone https://github.com/WilliamBossard/GensCore.git
cd GensCore
# First, build the web panel
cd web-panel
npm install
npm run build
cd ..
# Then, package the Java plugin
mvn clean package -DskipTests
The final file will be located in target/GensCore-1.0.3.jar.
Build via GitHub Actions
GensCore has a configured Workflow (in .github/workflows/release.yml).
- Go to your GitHub Repository, in the "Actions" tab.
- Select "Build and Release GensCore" on the left.
- Click on "Run workflow".
- GitHub will compile the project (both the React panel and the Java plugin) on its servers (for free) in a few seconds, then create a Draft Release.
- All you have to do is download the
.jar file from the GitHub Release without needing to install Java, Maven, or Node.js on your computer!
Plugin developed with passion for GensBien.
Language Support
GensCore fully supports multiple languages. The active language is set in config.yml:
lang: fr_FR # or en_US
Available language files are located in plugins/GensCore/lang/. Each file contains all player-facing messages that can be freely customized. Supported languages out of the box:
| Code |
Language |
fr_FR |
French |
en_US |
English |
Automatic Update Checker
On startup and when a player with the genscore.admin permission (or operator status) joins the server, GensCore automatically checks for a new release on GitHub.
- If a new version is available, a notification is sent in chat (visible to admins/ops only) and logged to the server console.
- The check is non-blocking and runs asynchronously to avoid any impact on startup time.
- The installed version is compared against the latest GitHub Release tag (e.g.
1.0.0 vs 1.0.1).
Commands & Permissions
Authentication
| Command |
Permission |
Description |
/register <password> <confirm> |
— |
Register your account (hashed via BCrypt) |
/login <password> |
— |
Log in to your account (Alias: /l) |
/changemdp <old> <new> |
— |
Change your account password (Alias: /changepassword) |
/resetmdp <player> |
genscore.admin |
Force-reset a player's password |
Economy, Dynamic Shop & Auction House
| Command |
Permission |
Description |
/money |
— |
View your current balance (Alias: /balance) |
/money <player> |
genscore.admin |
View another player's balance |
/baltop |
— |
Display top server balances leaderboard |
/pay <player> <amount> |
— |
Transfer money to another online player |
/eco <set|give|take|reset> |
genscore.admin |
Administer player balances |
/shop |
— |
Open the dynamic mathematical server shop GUI |
/ah |
— |
Open the Auction House marketplace (Alias: /hdv) |
/ah sell <price> |
— |
List the item in hand on the Auction House |
Guilds & Clans (/team)
| Command |
Permission |
Description |
/team |
— |
Open the Guild management GUI (Aliases: /guild, /teams) |
/team create <name> |
— |
Create a new guild (max 16 chars) |
/team invite <player> |
— |
Invite a player to join (Admin/Leader) |
/team accept |
— |
Accept a pending guild invitation |
/team kick <player> |
— |
Kick a member from the guild (Admin/Leader) |
/team promote/demote |
— |
Promote to Admin or demote to Member (Leader) |
/team leave |
— |
Leave current guild (Leader must disband) |
/team disband |
— |
Permanently disband the guild and release claims |
/team quest |
— |
Open the weekly co-op guild quest menu |
/team upgrades |
— |
Open the 10 guild perks upgrade shop |
/team sethome / /team home |
— |
Set or teleport to shared guild waypoint |
/team vault |
— |
Open communal guild virtual chest (Aliases: /team coffre, /team chest) |
/team deposit/withdraw |
— |
Deposit or withdraw dollars ($) from guild bank |
/team depositxp/withdrawxp |
— |
Deposit or withdraw XP levels from guild bank |
/team claim / /team unclaim |
— |
Claim or unclaim current chunk ($16 \times 16$) |
/team color <#hex> |
— |
Set guild territory marker color on BlueMap |
Jobs, Daily Quests & Solo Perks
| Command |
Permission |
Description |
/jobs |
— |
Open the Jobs & Professions menu (Alias: /job) |
/quests |
— |
Open the Daily Quests menu (Aliases: /quest, /quete) |
/perks |
— |
Open the Solo Quest Perks GUI (Aliases: /bonus, /passe) |
/autosmelt |
— |
Toggle instant raw ore auto-smelting On/Off |
/magnet |
— |
Toggle 5-block ground item magnet On/Off |
Teleportation & Navigation
| Command |
Permission |
Description |
/spawn |
genscore.spawn |
Teleport to world spawn |
/setspawn |
genscore.admin |
Set global server spawn location |
/sethome [name] |
genscore.home |
Set a personal home waypoint |
/home [name] |
genscore.home |
Teleport to a personal home waypoint |
/delhome [name] |
genscore.home |
Delete a personal home waypoint |
/back |
genscore.back |
Return to last death or teleport location |
/tpa <player> |
genscore.tpa |
Send a teleport request to a player |
/tpaccept |
genscore.tpa |
Accept incoming teleport request |
/tpdeny / /tpadeny |
genscore.tpa |
Deny incoming teleport request |
/tpacancel |
genscore.tpa |
Cancel your outgoing teleport request |
Container Security & Locks
| Command |
Permission |
Description |
/lock [private] |
— |
Lock a container (chest, barrel, furnace, shulker) |
/lock unlock |
— |
Remove the lock from your container |
/lock guild |
— |
Share container access with all guild members |
Survival Utilities
| Command |
Permission |
Description |
/ec [player] |
genscore.ec |
Open virtual Ender Chest (Alias: /enderchest) |
/craft |
genscore.craft |
Open virtual 3x3 workbench (Alias: /workbench) |
/anvil |
genscore.anvil |
Open virtual Anvil |
/enchant |
genscore.enchant |
Open virtual Enchanting Table (Alias: /enchanttable) |
/feed |
genscore.feed |
Satisfy hunger bar |
Staff & Moderation
| Command |
Permission |
Description |
/ban <player> [time] [reason] |
genscore.ban |
Ban a player permanently or temporarily |
/unban <player> |
genscore.ban |
Unban a player |
/mute <player> [time] [reason] |
genscore.mute |
Mute a player in public chat |
/unmute <player> |
genscore.mute |
Unmute a player |
/kick <player> [reason] |
genscore.kick |
Kick an online player from the server |
/freeze <player> |
genscore.freeze |
Freeze a player for screenshare checks |
/openinv <player> |
genscore.openinv |
Live inspect inventory & armor (Alias: /invsee) |
/check <player> |
genscore.check |
Technical dossier (Bedrock/Java, version, ping, coords) (Alias: /whois) |
Discord & Web Casino Bridge
| Command |
Permission |
Description |
/discord link |
— |
Generate a 6-character linking code for Discord (!link <code>) |
/discord reg |
— |
Display Discord linking instructions and invite |
/web |
— |
Help message for web casino deposit inventory |
/web deposit |
— |
Deposit held item into web casino betting inventory |
/web withdraw |
— |
Retrieve won items from the web slot machine |
Administration & Diagnostics
| Command |
Permission |
Description |
/gens status |
genscore.admin |
Live telemetry: platform, JVM memory, CPU load, Folia TPS, active modules |
/gens db |
genscore.admin |
Live database status: storage engine (SQLite/MySQL) and HikariCP pool stats |
/module <name> <on|off> |
genscore.admin |
Dynamically toggle any of the 30 modules at runtime |
/menu [name] |
— |
Open a custom YAML inventory menu from plugins/GensCore/menus/ |
/spawner give <player> <type> |
genscore.admin.spawner |
Give custom stacked smart spawner block |
Note: Players with operator status (/op) automatically inherit the genscore.admin permission.
For the complete list of all 30 modules, advanced subcommands, bypass permissions, and ready-to-use LuckPerms templates, see DOCUMENTATION.md and the Online Docs.
Lootr Integration
GensCore completely integrates a custom Lootr-like system (per-player loot chests) directly into the core, meaning you do not need to install any external mods or plugins. Chest data and per-player loot inventories are persisted in the configured database (SQLite or MySQL, in lootr_chests & lootr_player_chests tables). If a legacy chests.yml file is detected on startup, it will be migrated automatically and transparently.
You can configure its behaviour in the modules/lootr.yml file:
lootr:
prevent-hopper: true
prevent-break: false
particles-enabled: true
break-confirm-time: 3
Server Wipe
[!WARNING]
This action is irreversible. A server wipe permanently deletes all player data from the database (homes, economy, stats, auth, quests, etc.). It does not delete world files.
The Web Admin Panel includes a "Wipe Server Data" button at the bottom of the Configuration page. To prevent accidents:
- The button is prominently marked in red.
- Clicking it requires entering the admin password to confirm.
- The console will log a confirmation message when the wipe completes.
To perform a wipe from the console, the Web Panel must be running and accessible.
评论 0
登录后参与评分
还没有评论,来抢沙发吧