VJobs
一款基于数据的职业插件。玩家加入职业后,通过执行相关行为获得报酬,并积累经验以提升等级,最终达成声望重置。所有的职业、价格、经验曲线、特性、任务和事件均配置在 config.yml 中,无任何硬编码逻辑。
默认包含十八种职业:矿工(Miner)、农夫(Farmer)、伐木工(Woodcutter)、猎人(Hunter)、渔夫(Fisherman)、建筑师(Builder)、挖掘者(Digger)、酿造师(Brewer)、附魔师(Enchanter)、武器匠(Weaponsmith)、工匠(Crafter)、探险家(Explorer)、厨师(Cook)、商人(Trader)、红石工程师(Redstoner)、驯兽师(Tamer)、考古学家(Archaeologist)和铁匠(Blacksmith)。无需触碰代码即可添加、移除或调整这些职业的平衡性。完整的职业列表、行为类型及配置键名请参阅 FEATURES.md,详细文档见 wiki。
功能
进度系统
- 可配置的经验曲线等级、提供永久加成的声望层级、各等级头衔以及聊天栏和 PlaceholderAPI 使用的
[矿工 ★3] 风格前缀
- 每个职业的特性树:通过等级和声望获取点数,解锁增加金钱或经验、双倍掉落、自动补种、稀有鱼类战利品、权限或命令等特性
- 每日和每周任务从各职业的任务池中随机抽取
- 支持 27 种行为类型,包括破坏、收获、击杀、钓鱼、熔炼、烹饪、酿造、附魔、修理、繁殖、驯服、剪毛、挤奶、村民交易、刷可疑沙子、移动距离和鞘翅飞行
经济与平衡
- 支持 Vault、PlayerPoints、CoinsEngine 或控制台命令作为支付目标,可按职业选择;其他插件也可扩展自定义支付方式
- 大规模种植时收益递减,可选的动态价格机制跟随全服整体供需变化
- 每日每职业上限(可通过权限提升)、旧版按时间间隔的收入上限,以及填充服务器基金的税收机制
- 支付金额汇总后在行动栏、Boss 条或聊天栏中一次性显示
反作弊
- 玩家放置的方块数据保存在区块文件中并重启保留;种植的作物成熟后仍会发放奖励
- 刷怪笼生成的怪物无奖励或仅获得可配置比例的奖励,丝袜之触挖掘-放置-挖掘循环无奖励
- AFK 检测:若不进行观察或打字操作则不发放奖励,从而阻止水田和活塞农场作弊
- WorldGuard 区域标志
vjobs-payout、单点支付冷却、禁用世界、创造模式无奖励
活动与社区
- 竞赛功能:自动开始、排名展示并为前列玩家发放奖励
- Cron 调度增强活动(例如“每周六农夫双倍”),也可通过
/vjobs admin boost 手动触发
- 团队目标:支持 Towny 城镇、Lands、SimpleClans 公会或其他插件提供的任意群组
- 全服及各职业排行榜、计分板、全息插件占位符,以及里程碑 Discord Webhook 通知
技术特性
- 兼容 Paper、Purpur、Spigot 和 Folia,支持 Minecraft 1.21 及以上版本
- 支持 SQLite 或 MySQL (HikariCP),批量保存为单一事务,排行榜缓存,数据库操作在主线程之外执行
- 公开 API,包含事件、经济后端和群组提供者,以 Maven 构件形式发布
- Jobs Reborn 数据库导入工具
依赖
- Paper、Purpur、Spigot 或 Folia 1.21+,需 Java 21
- 经济系统:Vault 搭配经济插件,或 PlayerPoints、CoinsEngine
- 可选:PlaceholderAPI、WorldGuard、mcMMO、MythicMobs、Towny、Lands、SimpleClans
安装
- 将
VJobs-<version>.jar 放入 plugins/ 目录。
- 启动服务器一次以生成
config.yml 和消息文件。
- 修改
config.yml 并运行 /vjobs admin reload。
从 Jobs Reborn 迁移?使用 /vjobs admin import jobsreborn 复制等级和经验,详见 wiki 上的迁移页面。
命令
| 指令 |
说明 |
/vjobs |
职业菜单 |
/vjobs join <job> / leave <job> |
加入或离开职业 |
/vjobs info <job> |
职业详情,包含价格表与进度 |
/vjobs prices <job> |
在聊天栏显示价格表,包含你的倍率与市场趋势 |
/vjobs top [job|total] |
排行榜 |
/vjobs perks [job] |
增益商店 |
/vjobs quests |
每日与每周任务 |
/vjobs stats |
统计信息:赚取金额、操作次数、工作时长、最常见操作 |
/vjobs contest |
当前竞赛的排名情况 |
/vjobs prestige <job> |
对已满级的职业进行声望重置(Prestige) |
/vjobs lang <locale> |
更改你的语言设置 |
/vjobs togglenotify |
开启或关闭结算消息通知 |
/vjobs admin ... |
reload, set, setxp, setprestige, boost, contest, fund, resetquests, resetperks, import, editor, signs |
/jobs 和 /job 可作为别名使用。
权限
| 权限 |
说明 |
默认值 |
jobs.use |
使用职业系统 |
true |
jobs.admin |
管理员指令 |
op |
jobs.admin.editor |
游戏内职业编辑器 |
op |
jobs.admin.signs |
创建 [VJobs] 告示牌 |
op |
jobs.limit.<n> |
同时持有 n 个职业 |
false |
jobs.cooldown.hour / jobs.cooldown.instant |
缩短切换职业的冷却时间 |
false |
jobs.multiplier.vip / jobs.multiplier.mvp |
结算倍率加成 |
false |
jobs.dailylimit.vip / jobs.dailylimit.mvp |
更高的每日上限 |
false |
开发者 API
API 已发布至 Codeberg Maven 仓库。请在你的 plugin.yml 中将 VJobs 添加为 depend 或 softdepend。
Maven:
<repository>
<id>codeberg-lucasthcr</id>
<url>https://codeberg.org/api/packages/LucasTHCR/maven</url>
</repository>
<dependency>
<groupId>com.vjobs</groupId>
<artifactId>vjobs-api</artifactId>
<version>2.0-RELEASE</version>
<scope>provided</scope>
</dependency>
Gradle (Kotlin DSL):
repositories {
maven("https://codeberg.org/api/packages/LucasTHCR/maven")
}
dependencies {
compileOnly("com.vjobs:vjobs-api:2.0-RELEASE")
}
简短示例:
VJobsApi api = VJobsProvider.get();
// 周末挖掘钻石矿石时的额外奖励
@EventHandler
public void onPayout(JobPayoutEvent event) {
if (event.getKey().equals("DIAMOND_ORE")) event.setMoney(event.getMoney() * 1.5);
}
// 让职业通过你自己的货币进行结算:在 config.yml 中配置 economy: tokens
api.registerEconomyBackend(new TokenBackend());
事件包括:JobPayoutEvent、JobLevelUpEvent、JobPrestigeEvent、JobJoinEvent、JobLeaveEvent、PerkPurchaseEvent、QuestCompleteEvent、ContestEndEvent。其余内容请参阅 Wiki 中的“开发者 API”章节。
从源代码构建
mvn clean package
插件 jar 包将生成在 vjobs-plugin/target/VJobs-<version>.jar,带有源码和 Javadoc 的 API jar 包位于 vjobs-api/target/ 目录下。
许可证
本插件基于 GNU GPL v3 协议发布。API 模块 (vjobs-api) 基于 Apache License 2.0 协议发布,因此任何许可证的插件均可针对其进行编译。
VJobs
A data-driven jobs plugin. Players join a job, get paid for the actions that belong to it and level up toward a prestige reset. Every job, price, XP curve, perk, quest and event lives in config.yml, nothing is hardcoded.
Eighteen jobs ship by default: Miner, Farmer, Woodcutter, Hunter, Fisherman, Builder, Digger, Brewer, Enchanter, Weaponsmith, Crafter, Explorer, Cook, Trader, Redstoner, Tamer, Archaeologist and Blacksmith. Add, remove or rebalance any of them without touching code. The full list of jobs, actions and config keys is in FEATURES.md, the long form is in the wiki.
Features
Progression
- Levels with a configurable XP curve, prestige tiers with a permanent bonus, titles per level and a
[Miner ★3] style prefix for chat and PlaceholderAPI
- Perk trees per job: points from levels and prestige, perks for extra money or XP, double drops, auto-replant, rare fishing loot, permissions or commands
- Daily and weekly quests rolled from a pool per job
- 27 action types, among them breaking, harvesting, killing, fishing, smelting, cooking, brewing, enchanting, repairing, breeding, taming, shearing, milking, villager trades, brushing suspicious sand, distance travelled and elytra flight
Economy and balance
- Vault, PlayerPoints, CoinsEngine or a console command as payout target, chosen per job; other plugins can add their own
- Diminishing returns for mass farming, optional dynamic prices that follow what the whole server does
- Daily cap per job (raised by permission), the older income-per-interval cap, and a tax that fills a server fund
- Payouts are summed up and shown once in the action bar, a boss bar or chat
Anti-exploit
- Player-placed blocks are remembered in the chunk data and survive restarts; planted crops still pay once grown
- Spawner mobs pay nothing or a configurable share, silk-touch mine-place-mine loops pay nothing
- AFK detection: no payouts without looking around or typing, which stops water and piston farms
- WorldGuard region flag
vjobs-payout, per-location payout cooldown, disabled worlds, no pay in creative
Events and community
- Contests with automatic start, standings and rewards for the top places
- Boost events on a cron schedule ("every Saturday 2x for farmers") next to the manual
/vjobs admin boost
- Team goals for Towny towns, Lands, SimpleClans clans or any group another plugin provides
- Overall and per-job leaderboards, signs, placeholders for hologram plugins, Discord webhook for milestones
Technical
- Paper, Purpur, Spigot and Folia, 1.21 and newer
- SQLite or MySQL (HikariCP), batched saves in one transaction, cached leaderboards, database work off the main thread
- Public API with events, economy backends and group providers, published as a Maven artifact
- Importer for Jobs Reborn databases
Requirements
- Paper, Purpur, Spigot or Folia 1.21+ with Java 21
- An economy: Vault with an economy plugin, PlayerPoints or CoinsEngine
- Optional: PlaceholderAPI, WorldGuard, mcMMO, MythicMobs, Towny, Lands, SimpleClans
Installation
- Drop
VJobs-<version>.jar into plugins/.
- Start the server once to generate
config.yml and the message files.
- Adjust
config.yml and run /vjobs admin reload.
Coming from Jobs Reborn? /vjobs admin import jobsreborn copies levels and XP over, see the wiki page on migrating.
Commands
| Command |
Description |
/vjobs |
Job menu |
/vjobs join <job> / leave <job> |
Join or leave a job |
/vjobs info <job> |
Job details with price list and progress |
/vjobs prices <job> |
Price list in chat, with your multiplier and market trend |
/vjobs top [job|total] |
Leaderboard |
/vjobs perks [job] |
Perk shop |
/vjobs quests |
Daily and weekly quests |
/vjobs stats |
Statistics: money earned, actions, time worked, most common action |
/vjobs contest |
Standings of the running contest |
/vjobs prestige <job> |
Prestige a maxed job |
/vjobs lang <locale> |
Change your language |
/vjobs togglenotify |
Payout messages on or off |
/vjobs admin ... |
reload, set, setxp, setprestige, boost, contest, fund, resetquests, resetperks, import, editor, signs |
/jobs and /job work as aliases.
Permissions
| Permission |
Description |
Default |
jobs.use |
Use the jobs system |
true |
jobs.admin |
Admin commands |
op |
jobs.admin.editor |
In-game job editor |
op |
jobs.admin.signs |
Create [VJobs] signs |
op |
jobs.limit.<n> |
Hold n jobs at once |
false |
jobs.cooldown.hour / jobs.cooldown.instant |
Shorter job-switch cooldown |
false |
jobs.multiplier.vip / jobs.multiplier.mvp |
Payout multipliers |
false |
jobs.dailylimit.vip / jobs.dailylimit.mvp |
Higher daily cap |
false |
Developer API
The API is published to the Codeberg Maven registry. Add VJobs as depend or softdepend in your plugin.yml.
Maven:
<repository>
<id>codeberg-lucasthcr</id>
<url>https://codeberg.org/api/packages/LucasTHCR/maven</url>
</repository>
<dependency>
<groupId>com.vjobs</groupId>
<artifactId>vjobs-api</artifactId>
<version>2.0-RELEASE</version>
<scope>provided</scope>
</dependency>
Gradle (Kotlin DSL):
repositories {
maven("https://codeberg.org/api/packages/LucasTHCR/maven")
}
dependencies {
compileOnly("com.vjobs:vjobs-api:2.0-RELEASE")
}
A short example:
VJobsApi api = VJobsProvider.get();
// a bonus for diamonds on weekends
@EventHandler
public void onPayout(JobPayoutEvent event) {
if (event.getKey().equals("DIAMOND_ORE")) event.setMoney(event.getMoney() * 1.5);
}
// let jobs pay in your own currency: economy: tokens in config.yml
api.registerEconomyBackend(new TokenBackend());
Events: JobPayoutEvent, JobLevelUpEvent, JobPrestigeEvent, JobJoinEvent, JobLeaveEvent, PerkPurchaseEvent, QuestCompleteEvent, ContestEndEvent. Everything else is in the wiki under Developer API.
Building from source
mvn clean package
The plugin jar ends up in vjobs-plugin/target/VJobs-<version>.jar, the API jar with sources and javadoc in vjobs-api/target/.
License
The plugin is released under the GNU GPL v3. The API module (vjobs-api) is released under the Apache License 2.0, so plugins under any license can compile against it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧