Viper Jobs
适用于 Fabric 服务端的职业、任务与排行榜系统。玩家加入职业后,通过挖矿、挖掘、农耕、砍伐、钓鱼、狩猎等行为赚取金钱、经验值和点数。该模组包含每日任务、升级奖励、分页排行榜以及每月顶尖玩家奖品。它可与 Viper Economy(自动检测)或任何其他经济类模组配合使用,通过可配置的控制台命令实现交互。无需安装客户端模组。
模组简介
Viper Jobs 为服务器增添了一层 RPG 风格的进度系统。管理员可以定义职业(例如矿工、农夫或猎人),每种职业会根据特定的游戏内行为(如破坏方块或击杀实体)向玩家支付报酬。每次行动都会授予职业经验值(用于提升职业等级)、职业点数和金钱。此外,该模组还会运行每日任务、按职业和全局的排行榜,并为表现最佳的玩家自动发放每月奖品。所有内容均由 JSON 配置文件驱动,大多数更改可通过执行 /jobsadmin reload 命令实时生效,而无需重启服务器。
功能特性
- 21 种预设职业:Digger、Miner、Farmer、Builder、Hunter、Lumberjack、Fisherman、Butcher、Warrior、Alchemist、Beekeeper、Nether Explorer、Smith、Enchanter、Ranger、Archaeologist、Herbalist、Conqueror、Explorer、Trapper、Guardian
- 每种职业、行为、奖励、费用及等级上限均可配置;支持自由添加自定义职业
- 按行为计算金钱、经验值和点数奖励,默认设置为低收益平衡
- 升级奖励包括金钱、经验值、点数及自定义控制台命令,并在屏幕上方显示操作栏消息
- 24 个每日任务,目标和奖励均可配置
- 按职业(
/jobs top)和全局(/jobs gtop)排行榜,每页显示 10 条记录
- 每月为排名靠前的玩家提供奖品(金钱、经验值、点数和命令),每月自动发放一次
- 支持按玩家设置金钱倍率及职业数量限制(存储于
players/<name>.json 文件中)
- 可选的退出锁定(
allowLeave)、每日收入上限、定时加成、加入和退出费用
- 通过支付聚合、自动重试和可配置的失败策略确保可靠的 payouts
- 以汇总消息代替聊天刷屏,通知设置完全可配置
- 所有玩家进度采用 JSON 持久化存储,支持热重载,零客户端开销
玩家指令
| 指令 |
描述 |
/jobs |
显示你当前的职业、等级、经验值、点数和收入 |
/jobs stats |
显示你职业统计信息的紧凑摘要 |
/jobs list |
列出所有可用职业及其简要说明 |
/jobs join <job> |
加入一个职业(受 maxJobsPerPlayer 限制) |
/jobs leave [job] |
离开你的职业,或指定名称的职业(当 allowLeave 为 false 时将被阻止) |
/jobs info <job> |
显示某职业的详细信息、费用、最高等级及已配置的行为 |
/jobs quests |
显示今日分配的任务及你在每个任务中的进度 |
/jobs top [job] [page] |
显示按职业等级的排行榜,每页 10 条记录 |
/jobs gtop [page] |
显示全局排行榜(所有职业的总等级) |
管理员指令
所有管理员指令均使用 /jobsadmin,且需要至少 2 级操作员权限。
| 指令 |
描述 |
/jobsadmin reload |
从磁盘热重载所有配置文件,无需重启 |
/jobsadmin status |
显示当前激活的经济提供商、失败策略、聚合状态、职业和任务状态 |
/jobsadmin money <player> <amount> |
通过当前激活的经济提供商向玩家发放金钱 |
/jobsadmin xp <player> <job> <amount> |
向玩家在指定职业中添加经验值 |
/jobsadmin points <player> <job> <amount> |
向玩家在指定职业中添加职业点数 |
/jobsadmin join <player> <job> |
强制将玩家加入某个职业 |
/jobsadmin leave <player> <job> |
强制将玩家从某个职业中移除(绕过 allowLeave 锁定) |
/jobsadmin price <player> <multiplier> |
设置按玩家的金钱倍率,存储于 players/<name>.json |
/jobsadmin maxjobs <player> <n> |
设置按玩家的职业数量限制(0 或 -1 则回退到全局限制) |
/jobsadmin prices <player> |
显示玩家当前的职业、金钱倍率和职业数量限制 |
/jobsadmin reset <player> |
重置玩家的所有职业数据 |
/jobsadmin quests reset [player] |
重新分配所有玩家或单个玩家的每日任务 |
配置
所有文件在首次启动时创建,位于 config/viper-jobs/ 目录下。编辑后,运行 /jobsadmin reload(或重启服务器)以应用更改。
economy.json
控制金钱奖励的发放方式。
| 设置项 |
说明 |
enabled |
金钱奖励的主开关 |
autoDetectCommands |
当配置的命令模板验证失败时,自动选择可用的命令模板 |
validateCommandsOnStartup |
在启动时对每个命令模板针对实时命令调度器进行测试 |
disableMoneyRewardsWhenUnavailable |
当未找到经济系统时关闭金钱奖励(保留经验值、点数和任务) |
providerModIds |
用于检查 Viper Economy 整合的模组 ID(viper-economy, viper_economy) |
commands.deposit |
用于向玩家支付金钱的控制台命令,支持 {player} 和 {amount} |
commands.withdraw |
用于从玩家处扣除金钱的控制台命令 |
commands.setBalance |
用于设置玩家余额的控制台命令 |
commands.getBalance |
用于读取玩家余额的控制台命令 |
commands.reloadEconomy |
用于重载经济系统的控制台命令 |
formatting.decimalPlaces |
格式化金额时使用的decimal位数 |
formatting.minimumPayment |
低于此金额的支付将被跳过 |
formatting.roundingMode |
用于金额的舍入模式(默认为 HALF_UP) |
aggregation.enabled |
将许多小额 payout 合并为 fewer 次命令执行 |
aggregation.intervalTicks |
聚合后的 payout 刷新的频率,单位为 ticks |
failureHandling.policy |
支付失败时的处理方式(GRANT_NON_MONEY_REWARDS 会保留经验值和点数) |
failureHandling.maximumRetries |
失败支付的重试次数 |
failureHandling.retryDelayTicks |
支付重试之间的延迟,单位为 ticks |
failureHandling.logFailures |
将失败的支付记录到服务器控制台 |
failureHandling.notifyAdministrators |
通知在线管理员关于失败的支付 |
job_config.json
定义所有职业、其操作、奖励以及全局职业设置。旧的 jobs.json 文件会自动迁移。
| 设置项 |
说明 |
settings.maxJobsPerPlayer |
一个玩家同时可以持有的职业数量上限 |
settings.baseXpForLevel |
首次升级所需的经验值 |
settings.xpGrowth |
每级经验曲线的增长系数 |
settings.incomeLimitEnabled |
启用每日收入上限 |
settings.incomeLimitPerDay |
启用上限时,每位玩家每天可获得的最高金额 |
settings.moneyRewardsEnabled |
行动金钱奖励的主开关 |
settings.levelUpMoneyEnabled |
每次升级时支付奖金 |
settings.levelUpMoney |
每次升级时支付的金额 |
settings.joinFee / settings.leaveFee |
加入或离开职业时收取的全局费用 |
settings.notifyOnPay |
为每次单独支付发送即时聊天消息(默认关闭以避免垃圾信息) |
settings.notifySummaryEnabled |
发送定期收入摘要,而不是按行动的消息 |
settings.notifySummaryIntervalMinutes |
收入摘要发送的频率 |
settings.topListMax |
排行榜页面每页的条目数(默认 10) |
settings.broadcastJoinLeave |
在聊天中宣布职业的加入和离开 |
settings.allowLeave |
当为 false 时,玩家不能自行离开职业(管理员可通过 /jobsadmin leave 绕过) |
settings.monthlyPrizesEnabled |
向排名靠前的玩家支付月度奖品 |
settings.monthlyPrizesDay |
支付奖品的月份中的某一天 |
settings.monthlyPrizes |
奖品列表,包含每个排名的 rank、money、xp、points 和 commands |
settings.globalMoneyMultiplier |
一次性缩放所有金钱奖励 |
jobs[].id |
在命令中使用的唯一职业标识符 |
jobs[].meta.name / jobs[].meta.description |
列表中显示的显示名称和描述 |
jobs[].maxLevel |
该职业可达到的最高等级 |
jobs[].joinFee / jobs[].leaveFee |
每个职业的加入和离开费用 |
jobs[].actions[].id |
由任务使用的唯一操作标识符 |
jobs[].actions[].type |
BLOCK_BREAK 或 KILL_ENTITY |
jobs[].actions[].blocks / jobs[].actions[].entities |
触发操作的方块或实体 ID |
jobs[].actions[].xp |
每次操作给予的职业经验值 |
jobs[].actions[].points |
每次操作给予的职业点数 |
jobs[].actions[].money |
每次操作给予的金钱(可根据低收益或高收益服务器自由编辑) |
jobs[].levelRewards[] |
在特定等级给予的额外奖励(level、money、xp、points、commands) |
奖励命令中支持的占位符:{player}, {uuid}, {job}, {job_id}, {reason}.
quests.json
控制每日任务系统。
| 设置项 |
说明 |
enabled |
任务的主开关 |
daily |
每天分配一套新的任务 |
resetHourUtc |
任务重置的一天中的小时(UTC) |
questsPerDay |
每位玩家每天接收的任务数量 |
quests[].id |
唯一的任务标识符 |
quests[].name / quests[].description |
向玩家显示的显示名称和目标文本 |
quests[].job |
任务所属的职业 |
quests[].action |
计入任务的行动 ID(来自 job_config.json) |
quests[].required |
必须执行该操作的次数 |
quests[].rewards.money / quests[].rewards.xp / quests[].rewards.points |
完成时给予的奖励 |
players folder
players/<playername>.json 文件保存每个玩家的覆盖设置,并在玩家加入职业或收到管理员覆盖时自动创建。jobs 列表在每次加入和离开时保持同步。
| 设置项 |
说明 |
playerName / uuid |
文件所属的玩家身份 |
jobs |
玩家当前的职业(自动更新) |
moneyMultiplier |
乘以该玩家获得的所有金钱(默认 1.0) |
jobMoneyMultipliers |
针对特定职业的每职业乘数,用于覆盖 moneyMultiplier |
maxJobs |
个人职业限制;-1(或 0)使用全局的 maxJobsPerPlayer |
data folder
data/ 目录存储所有持久化的玩家进度:职业等级、经验值(XP)、点数、每日收益、任务状态以及收益账本。你通常无需手动编辑这些文件。
货币说明
货币奖励通过当前激活的经济系统提供商发放(默认为 Viper Economy,自动检测)。如果未找到任何经济模组或可用的金钱指令,货币奖励将自动禁用,而职业经验值、点数、任务和非货币类奖励仍会正常工作。若要使用其他经济模组,请将 economy.json 中 commands 部分指向其给予、扣除和设置金钱的指令,然后运行 /jobsadmin reload。
安装方法
- 安装 Fabric Loader 0.19.3 或更高版本以及 Fabric API。
- Minecraft 1.21.x 请使用 Java 21,Minecraft 26.x 请使用 Java 25。
- 下载与你的 Minecraft 版本匹配的文件(1.21、26.1、26.2 或 26.3),并将其放入服务器的
mods 文件夹中。
- 可选:安装 Viper Economy 以启用货币奖励(该模组会被自动检测)。
- 启动服务器。配置文件将在
config/viper-jobs/ 目录下生成。
- 根据需要审查并自定义配置文件。
- 运行
/jobsadmin reload 或重启服务器以应用更改。
Viper Jobs
Server-side jobs, quests and leaderboard system for Fabric servers. Players join jobs and earn money, XP and points for mining, digging, farming, chopping, fishing, hunting and more. The mod includes daily quests, level-up rewards, paginated leaderboards and monthly top-player prizes. It works with Viper Economy (auto-detected) or any other economy mod through configurable console commands. No client mods are required.
What the mod is
Viper Jobs adds an RPG-style progression layer to a server. Administrators define jobs (for example Miner, Farmer or Hunter), and each job pays players for specific in-game actions such as breaking blocks or killing entities. Every action grants job XP (which levels the job up), job points and money. On top of that the mod runs daily quests, per-job and global leaderboards, and automatic monthly prizes for the best players. Everything is driven by JSON config files, and most changes can be applied live with /jobsadmin reload without restarting the server.
Features
- 21 ready-made jobs: Digger, Miner, Farmer, Builder, Hunter, Lumberjack, Fisherman, Butcher, Warrior, Alchemist, Beekeeper, Nether Explorer, Smith, Enchanter, Ranger, Archaeologist, Herbalist, Conqueror, Explorer, Trapper, Guardian
- Every job, action, reward, fee and level cap is configurable; custom jobs can be added freely
- Per-action money, XP and point rewards with low-pay default tuning
- Level-up money, XP, points and custom console commands, plus an on-screen action-bar message
- 24 daily quests with configurable goals and rewards
- Per-job (
/jobs top) and global (/jobs gtop) leaderboards, paginated at 10 entries per page
- Monthly prizes for the top-ranked players (money, XP, points and commands), paid automatically once per month
- Per-player money multipliers and per-player job limits (
players/<name>.json files)
- Optional leave lock (
allowLeave), daily income limits, scheduled bonuses, join and leave fees
- Reliable payouts through payment aggregation, automatic retries and configurable failure policies
- Earnings summary messages instead of chat spam, fully configurable notification settings
- JSON persistence for all player progress, hot reload support, zero client overhead
Player commands
| Command |
Description |
/jobs |
Show your current jobs, levels, XP, points and earnings |
/jobs stats |
Show a compact summary of your job statistics |
/jobs list |
List all available jobs with short descriptions |
/jobs join <job> |
Join a job (limited by maxJobsPerPlayer) |
/jobs leave [job] |
Leave your job, or the named job (blocked when allowLeave is false) |
/jobs info <job> |
Show a job's details, fees, max level and configured actions |
/jobs quests |
Show today's assigned quests and your progress on each |
/jobs top [job] [page] |
Show the per-job level leaderboard, 10 entries per page |
/jobs gtop [page] |
Show the global leaderboard (total level across all jobs) |
Admin commands
All admin commands use /jobsadmin and require operator level 2 or higher.
| Command |
Description |
/jobsadmin reload |
Hot-reload all config files from disk without a restart |
/jobsadmin status |
Show the active economy provider, failure policy, aggregation state, job and quest state |
/jobsadmin money <player> <amount> |
Grant money to a player through the active economy provider |
/jobsadmin xp <player> <job> <amount> |
Add XP to a player in the given job |
/jobsadmin points <player> <job> <amount> |
Add job points to a player in the given job |
/jobsadmin join <player> <job> |
Force-join a player to a job |
/jobsadmin leave <player> <job> |
Force-remove a player from a job (bypasses the allowLeave lock) |
/jobsadmin price <player> <multiplier> |
Set a per-player money multiplier, stored in players/<name>.json |
/jobsadmin maxjobs <player> <n> |
Set a per-player job limit (0 or -1 falls back to the global limit) |
/jobsadmin prices <player> |
Show a player's current jobs, money multipliers and job limit |
/jobsadmin reset <player> |
Reset all job data for a player |
/jobsadmin quests reset [player] |
Reassign daily quests for all players, or for one player |
Configuration
All files are created on first launch under config/viper-jobs/. After editing, run /jobsadmin reload (or restart the server) to apply them.
economy.json
Controls how money rewards are paid out.
| Setting |
Description |
enabled |
Master switch for money rewards |
autoDetectCommands |
Automatically pick working command templates when the configured ones fail validation |
validateCommandsOnStartup |
Test every command template against the live command dispatcher on startup |
disableMoneyRewardsWhenUnavailable |
Turn money off (keeping XP, points and quests) when no economy is found |
providerModIds |
Mod IDs checked for the Viper Economy integration (viper-economy, viper_economy) |
commands.deposit |
Console command used to pay a player, supports {player} and {amount} |
commands.withdraw |
Console command used to take money from a player |
commands.setBalance |
Console command used to set a player's balance |
commands.getBalance |
Console command used to read a player's balance |
commands.reloadEconomy |
Console command used to reload the economy side |
formatting.decimalPlaces |
Decimal places used when formatting amounts |
formatting.minimumPayment |
Payments below this amount are skipped |
formatting.roundingMode |
Rounding mode used for amounts (HALF_UP by default) |
aggregation.enabled |
Batch many small payouts into fewer command executions |
aggregation.intervalTicks |
How often aggregated payouts are flushed, in ticks |
failureHandling.policy |
What happens when a payment fails (GRANT_NON_MONEY_REWARDS keeps XP and points) |
failureHandling.maximumRetries |
How many times a failed payment is retried |
failureHandling.retryDelayTicks |
Delay between payment retries, in ticks |
failureHandling.logFailures |
Log failed payments to the server console |
failureHandling.notifyAdministrators |
Notify online admins about failed payments |
job_config.json
Defines all jobs, their actions, rewards and the global job settings. An old jobs.json file is migrated automatically.
| Setting |
Description |
settings.maxJobsPerPlayer |
How many jobs one player may hold at the same time |
settings.baseXpForLevel |
XP needed for the first level-up |
settings.xpGrowth |
Growth factor of the XP curve per level |
settings.incomeLimitEnabled |
Enable a cap on money earned per day |
settings.incomeLimitPerDay |
Maximum money payable per player per day when the limit is enabled |
settings.moneyRewardsEnabled |
Master switch for action money rewards |
settings.levelUpMoneyEnabled |
Pay a bonus on every level-up |
settings.levelUpMoney |
Amount paid on every level-up |
settings.joinFee / settings.leaveFee |
Global fees charged for joining or leaving a job |
settings.notifyOnPay |
Send an instant chat message for every single payout (off by default to avoid spam) |
settings.notifySummaryEnabled |
Send a periodic earnings summary instead of per-action messages |
settings.notifySummaryIntervalMinutes |
How often the earnings summary is sent |
settings.topListMax |
Entries per leaderboard page (default 10) |
settings.broadcastJoinLeave |
Announce job joins and leaves in chat |
settings.allowLeave |
When false, players cannot leave jobs on their own (admins bypass with /jobsadmin leave) |
settings.monthlyPrizesEnabled |
Pay monthly prizes to the top-ranked players |
settings.monthlyPrizesDay |
Day of the month on which prizes are paid |
settings.monthlyPrizes |
Prize list with rank, money, xp, points and commands per rank |
settings.globalMoneyMultiplier |
Scales every money reward at once |
jobs[].id |
Unique job identifier used in commands |
jobs[].meta.name / jobs[].meta.description |
Display name and description shown in lists |
jobs[].maxLevel |
Highest reachable level for the job |
jobs[].joinFee / jobs[].leaveFee |
Per-job join and leave fees |
jobs[].actions[].id |
Unique action identifier used by quests |
jobs[].actions[].type |
BLOCK_BREAK or KILL_ENTITY |
jobs[].actions[].blocks / jobs[].actions[].entities |
Block or entity IDs that trigger the action |
jobs[].actions[].xp |
Job XP granted per action |
jobs[].actions[].points |
Job points granted per action |
jobs[].actions[].money |
Money granted per action (edit freely for low-pay or rich servers) |
jobs[].levelRewards[] |
Extra rewards granted at specific levels (level, money, xp, points, commands) |
Placeholders supported in reward commands: {player}, {uuid}, {job}, {job_id}, {reason}.
quests.json
Controls the daily quest system.
| Setting |
Description |
enabled |
Master switch for quests |
daily |
Assign a fresh set of quests every day |
resetHourUtc |
Hour of day (UTC) when quests reset |
questsPerDay |
How many quests each player receives per day |
quests[].id |
Unique quest identifier |
quests[].name / quests[].description |
Display name and goal text shown to players |
quests[].job |
Job the quest belongs to |
quests[].action |
Action ID (from job_config.json) that counts toward the quest |
quests[].required |
How many times the action must be performed |
quests[].rewards.money / quests[].rewards.xp / quests[].rewards.points |
Rewards granted on completion |
players folder
players/<playername>.json files hold per-player overrides and are created automatically when a player joins a job or receives an admin override. The jobs list is kept in sync on every join and leave.
| Setting |
Description |
playerName / uuid |
Player identity the file belongs to |
jobs |
The player's current jobs (updated automatically) |
moneyMultiplier |
Multiplies all money this player earns (default 1.0) |
jobMoneyMultipliers |
Per-job multipliers that override moneyMultiplier for specific jobs |
maxJobs |
Personal job limit; -1 (or 0) uses the global maxJobsPerPlayer |
data folder
data/ stores all persistent player progress: job levels, XP, points, daily earnings, quest states and the earnings ledger. You normally never need to edit these files by hand.
Money notes
Money rewards are paid through the active economy provider (Viper Economy by default, auto-detected). If no economy mod or usable money commands are found, money rewards are automatically disabled while job XP, points, quests and non-money rewards keep working. To use a different economy mod, point the commands section of economy.json at its give, take and set commands and run /jobsadmin reload.
Installation
- Install Fabric Loader 0.19.3 or newer and Fabric API.
- Use Java 21 for Minecraft 1.21.x, or Java 25 for Minecraft 26.x.
- Download the file matching your Minecraft version (1.21, 26.1, 26.2 or 26.3) and put it in the server
mods folder.
- Optional: install Viper Economy for money rewards (it is detected automatically).
- Start the server. Configs are created under
config/viper-jobs/.
- Review and customize the configs to your needs.
- Run
/jobsadmin reload or restart the server to apply changes.
评论 0
登录后参与评分
还没有评论,来抢沙发吧