ChristmasGift
带有层级、连击和轮盘抽奖功能的圣诞礼物盒,全部通过游戏内菜单进行管理。
这是什么?
玩家右键点击礼物盒后,轮盘会在粒子效果和音效中旋转并经过各个层级,最终停在某一层级上,玩家将获得该层级对应的随机奖励。奖励本质上是控制台命令,因此你可以给予物品、金钱、经验值、排名、宝箱钥匙或任何插件能通过命令实现的其他内容。
功能
| 功能 |
详情 |
| 分级奖励 |
内置普通、稀有、史诗、传说和神话等级。可自由添加任意数量的等级。 |
| 连击系统 |
快速连续打开礼物,奖励数量将翻倍。 |
| 管理员菜单 |
可在游戏内调整概率、增删改奖励以及创建等级。显示每个等级的实际掉落百分比。 |
| 全服广播 |
可选开启,当玩家获得奖励时向整个服务器播报。 |
| 多语言支持 |
所有消息与界面文本均通过语言文件配置。已包含英文和印尼语。 |
| 无丢失奖励 | 在开启礼物时退出游戏或服务器重启?奖励将在下次加入时发放。 |
| 无法伪造 | 礼物拥有隐藏标签,重命名的箱子无效。 |
工作原理
- 管理员使用
/cgift give <数量> <玩家> 发放礼物(控制台同样有效,因此箱子、投票和活动也可以分发)。
- 玩家手持礼物并点击 鼠标右键。
- 轮盘转动并根据你设定的概率停在一个层级上。
- 从该层级中随机给予一个奖励,屏幕上显示标题并可进行可选的全服广播。
组合
在打开上一个礼物的 10 秒内开启下一个礼物即可保持连击。
| 连续礼物数 |
奖励倍率 |
| 3+ |
1.5x |
| 5+ |
2x |
| 10+ |
3x |
以上所有设置均可在 config.yml 中修改。
默认层级
| 层级 |
概率 |
示例奖励 |
| 普通 |
45% |
钻石、绿宝石、$1,000、技能经验值 |
| 稀有 |
30% |
下界合金锭、附魔金苹果、$5,000 |
| 史诗 |
15% |
钻石块、$10,000、所有技能各 2,000 经验值 |
| 传说 |
8% |
鞘翅、下界合金剑、$50,000 |
| 神话 |
2% |
信标、龙蛋、$100,000 |
命令
| 命令 |
说明 |
/christmasgift |
打开管理员菜单 |
/christmasgift give <数量> [玩家] |
给予 1-64 份礼物(从控制台执行时需指定玩家) |
/christmasgift reload |
重新加载配置文件、奖励和语言文件 |
别名:/cgift 和 /xmasgift
权限: christmasgift.admin 用于所有命令和管理菜单(默认由 OP 拥有)。玩家无需任何权限即可打开礼物。
配置
rewards.yml 示例
每个层级都有一个 chance(权重,无需总和为 100)以及一组命令列表。系统会随机选取其中一条命令,并将 %player% 替换为玩家的名字。
tiers:
rare:
chance: 30.0
color: "&b"
prefix: "&f[&b稀有奖励&f]"
rewards:
- "give %player% minecraft:diamond 5"
- "eco give %player% 5000"
- "skills xp add %player% all 1000"
- 连击倍率会影响
give、eco give、xp 和 skills xp add 命令中的数值。其他命令则按原样运行。
- 如果希望玩家看到的名称与层级键名不同,可以为层级添加
display-name。
AuraSkills 的“所有”技能
AuraSkills 没有提供一次性为所有技能给予经验值的选项,因此本插件替你完成了这一操作。skills xp add %player% all <amount> 会在 config.yml 的 auraskills.enabled-skills 下列出的所有技能中给予指定的经验值数量。请移除服务器上未使用的技能。
语言
在 config.yml 中将 settings.language 设置为 en 或 id。语言文件位于 plugins/ChristmasGift/lang/ 目录下,你可以随意编辑它们。
如需使用其他语言,请将 en.yml 复制为类似 es.yml 的文件,翻译后并在配置中设置 language: es。任何未翻译的内容将回退到英文。如果希望完全不发送某条消息,可将其设置为 ""。
奖励消息中的物品名称会显示为每位玩家游戏内的本地语言。
config.yml
包括礼物之间的冷却时间、广播开关、连击层级(所需礼物数量、倍率、名称、颜色)、效果与声音,以及礼物物品本身(名称、描述、材质)。所有内容均在文件中进行了详细说明。
依赖
|
|
| 服务器 |
Paper 1.21 - 1.21.11 或 26.2。Purpur 等分支也可兼容。不支持 Spigot。 |
| Java |
21(Paper 26.x 实际上运行于 Java 25) |
| 必需插件 |
无 |
| 可选插件 |
EssentialsX 或任何带有 eco give 命令的插件以提供金钱奖励,AuraSkills 用于技能经验值 |
安装
- 将 jar 文件放入你的
plugins 文件夹中。
- 重启服务器(不要使用
/reload)。
- 在
rewards.yml 中或游戏中通过 /cgift 命令设置你的奖励层级。
- 开始发放礼物。
发现错误或有任何想法? 欢迎在 Discord 上与我们交流。
如果你喜欢这个插件,在 Modrinth 上关注我们将非常有帮助。
ChristmasGift
Christmas loot boxes with tiers, combos and a roulette, all managed from an in-game menu.
What is it?
A player right-clicks a gift, a roulette spins through the tiers with particles and sounds, and they get a random reward from the tier it lands on. Rewards are plain console commands, so you can give items, money, XP, ranks, crate keys or anything else another plugin can do with a command.
Features
| Feature |
Details |
| Tiered rewards |
Common, Rare, Epic, Legendary and Mythic out of the box. Add as many tiers as you want. |
| Combo system |
Open gifts quickly one after another and the rewards get multiplied. |
| Admin menu |
Change chances, add/edit/remove rewards and create tiers in game. Shows the real drop % of every tier. |
| Broadcasts |
Optionally tell the whole server what someone just got. |
| Translations |
Every message and GUI text is in a language file. English and Indonesian included. |
| No lost rewards |
Logged out or server restarted while a gift was opening? The reward is given on the next join. |
| Can't be faked |
Gifts have a hidden tag, a renamed chest won't work. |
How it works
- An admin gives gifts with
/cgift give <amount> <player> (works from console too, so crates, votes and events can hand them out).
- The player holds the gift and presses Right Click.
- The roulette spins and lands on a tier based on the chances you set.
- One random reward from that tier is given, with a title on screen and an optional broadcast.
Combos
Each gift opened within 10 seconds of the previous one keeps the combo going.
| Gifts in a row |
Reward multiplier |
| 3+ |
1.5x |
| 5+ |
2x |
| 10+ |
3x |
All of these can be changed in config.yml.
Default tiers
| Tier |
Chance |
Example rewards |
| Common |
45% |
Diamonds, emeralds, $1,000, skill XP |
| Rare |
30% |
Netherite ingot, enchanted golden apples, $5,000 |
| Epic |
15% |
Diamond blocks, $10,000, 2,000 XP in all skills |
| Legendary |
8% |
Elytra, netherite sword, $50,000 |
| Mythic |
2% |
Beacon, dragon egg, $100,000 |
Commands
| Command |
Description |
/christmasgift |
Opens the admin menu |
/christmasgift give <amount> [player] |
Gives 1-64 gifts (player is required from console) |
/christmasgift reload |
Reloads config, rewards and language |
Aliases: /cgift and /xmasgift
Permission: christmasgift.admin for all commands and the admin menu (op by default). Players don't need any permission to open gifts.
Configuration
rewards.yml example
Every tier has a chance (a weight, it doesn't need to add up to 100) and a list of commands. One command is picked at random and %player% is replaced with the player's name.
tiers:
rare:
chance: 30.0
color: "&b"
prefix: "&f[&bRare Reward&f]"
rewards:
- "give %player% minecraft:diamond 5"
- "eco give %player% 5000"
- "skills xp add %player% all 1000"
- The combo multiplier scales the amount in
give, eco give, xp and skills xp add commands. Other commands run as they are.
- Add
display-name to a tier if you want players to see a different name than the tier key.
AuraSkills "all" skills
AuraSkills has no option to give XP in every skill at once, so the plugin does it for you. skills xp add %player% all <amount> gives the amount in every skill listed under auraskills.enabled-skills in config.yml. Remove the skills you don't use on your server.
Languages
Set settings.language in config.yml to en or id. The files are in plugins/ChristmasGift/lang/ and you can edit them however you like.
For another language, copy en.yml to something like es.yml, translate it and set language: es. Anything you don't translate falls back to English. Set a message to "" if you don't want it sent at all.
Item names in reward messages show up in each player's own game language.
config.yml
Cooldown between gifts, broadcast on/off, the combo tiers (gifts needed, multiplier, name, color), effects and sounds, and the gift item itself (name, lore, material). Everything is explained inside the file.
Requirements
|
|
| Server |
Paper 1.21 - 1.21.11 or 26.2. Forks like Purpur should work too. Spigot is not supported. |
| Java |
21 (Paper 26.x runs on Java 25 anyway) |
| Required plugins |
None |
| Optional |
EssentialsX or any plugin with an eco give command for money rewards, AuraSkills for skill XP |
Installation
- Put the jar in your
plugins folder.
- Restart the server (don't use
/reload).
- Set up your tiers in
rewards.yml or in game with /cgift.
- Start handing out gifts.
Found a bug or have an idea? Come say hi on Discord.
If you like the plugin, a follow on Modrinth helps a lot.
评论 0
登录后参与评分
还没有评论,来抢沙发吧