Achievements - 由 Lolmewn 制作
这个插件有什么作用?
此插件允许你为游戏添加额外的成就。该插件需要我的另一个插件 Stats 才能正常工作。
使用此插件,你可以向游戏中添加成就,并为它们设置奖励。每当玩家获得一个成就时,你可以让命令运行、给予他们金钱和/或物品,以及通过此插件提供的 API 实现更多功能。
如何安装此插件?
从 文件页面 下载最新文件,并将其放入你的 plugins 文件夹中。
配置插件
config.yml
这里没什么太多可配置的。你可以切换是否自动更新,仅此而已。
achievements.yml
这是你存储所有成就的地方。一个成就必须具有如下布局:
<id> name: YourAchievementName goals: - Stat <amount> <TOTAL or the variables belonging to this Stat> - another one?
其余部分相当直观。一旦我有时间,我会写一个关于如何编写成就的好教程页面。
统计项(Stats)
以下是可用的统计项:
| 统计项 | 描述 | 变量 |
|---|---|---|
| Block_break | 所有被破坏的方块及其数据值 | itemId itemData breaking |
| Block_place | 所有放置的方块及其数据值 | itemId itemData breaking |
| Death | 所有死亡及其原因 | cause entity(boolean, true is safest) |
| Kill | 所有击杀及其原因 | type |
| Move | 步行、乘船、骑火车、骑猪或骑马。 | type (0=walk, 1=boat, 2=train, 3=pig, 4=pig in train, 5=horse) |
| Playtime | 游玩时间(以秒为单位) | |
| Arrows | 射出的箭矢数量 | |
| Xp_gained | 获得的总经验值 | |
| Joins | 加入服务器的总次数 | |
| Fish_catched | 捕获的鱼的总数 | |
| Damage_taken | 受到的总伤害 | |
| Times_kicked | 被踢出服务器的总次数 | |
| Tools_broken | 损坏的工具总数 | |
| Eggs_thrown | 投掷的鸡蛋总数 | |
| Items_crafted | 合成的物品总数 | |
| Omnomnom | 吃零食的总次数 | |
| On_fire | 着火的总次数 | |
| Words_said | 说出的单词总数 | |
| Commandsdone | 执行的命令总数 | |
| Votes | 为服务器投票的总次数(使用 Votifier) | |
| Worldchange | 更换世界的总次数 | |
| Bucketfill | 装满水桶的总次数 | |
| Bucketempty | 倒空水桶的总次数 | |
| Bedenter | 进入床的总次数 | |
| Itemdrops | 掉落物品的总次数 | |
| Itempickups | 拾取物品的总次数 | |
| Teleports | 传送的总次数 | |
| Shear | 剪羊毛的总次数 | |
| Lastjoin | 玩家上次加入服务器的时间 | |
| Lastleave | 玩家上次离开服务器的时间 |
想使用带有变量的统计项吗?你必须指定变量或使用 'TOTAL'。
带变量的统计类型
一些统计项有变量。一个好的例子是 Block_break,它有变量 <blockId> <blockData> 和 <breaking>。
如果你想要一个目标,让玩家必须破坏 5 个蓝色羊毛块,那么目标将是
- Block_break 5 35 3 true
如果方块没有特殊的数据值(例如只有一种类型),则使用 0 作为 blockData。示例:
- Block_break 20 1 0 true
这意味着破坏 20 个石头方块。
其他特殊统计项的示例:
- Block_place 5 TOTAL - Move 1000 1 #移动 1000 格,运输类型为 1(船) - Kill 10 Zombie - Death 3 Creeper
格式始终为 - Stat Amount Total|Variables|<empty>
物品奖励
物品奖励的写法有点复杂。基本上,你应该这样写:
items: <itemId>.<itemData>,<amount>;<itemId>.<itemData>,amount;... etc.items: 35.3,10;1,10 items: 1,20
注意:itemData 并非必须指定
itemID 显然是物品所对应的 ID(你可以在这里找到完整列表),itemData 也列在该表中,而数量……嗯,显而易见。
第一个示例给予你 10 个彩色羊毛和 10 个石头。第二个示例给予你 20 个石头。
achievements.yml 示例
你可以在这里找到一个示例。在编写新的成就时,建议你参考此页面以了解各个选项的作用。
命令与权限
| 命令 | 权限 | 描述 |
|---|---|---|
| /ach | achievements.view.self | 查看你的进度 |
| /ach player <player> | achievements.view.others | 查看其他人的进度 |
| /ach reload | achievements.reload | 保存所有玩家数据并重新加载所有成就 |
| /ach page <page> | achievements.view.self | 查看你进度的第 <page> 页 |
| /ach <achievement> | 查看某项成就的详情 |
开发构建版本
该项目的开发构建版本可通过提供的持续集成服务器获取。
这些构建版本未经 BukkitDev 工作人员批准。使用风险自负,它们可能完全无法运行,也可能正常运行。
Stats 的开发构建版本可在我的 CI 服务器上找到,地址为 。
源代码
想参与开发,或单纯想了解插件的运行原理?
请访问我的 Bitbucket!
指标统计
本插件使用了 Hidendra 的插件指标系统,这意味着以下信息会被收集并发送至 mcstats.org:
- 一个唯一标识符
- 服务器的 Java 版本
- 服务器处于离线模式还是在线模式
- 插件的版本
- 服务器的版本
- 操作系统版本/名称及架构
- CPU 核心数
- 在线玩家数量
- Metrics 的版本
如果你希望禁用此功能(/me 哭泣),你可以通过退出订阅来禁用,这可以在 /plugins/PluginMetrics/ 下的配置文件中完成。
自动更新器
本插件内置了自动更新器,它会连接至 BukkitDev 以检查更新。如果出于某些原因你希望禁用此过程,你可以在插件的设置文件中将 'update' 设置为 false。
IRC 支持
你可以在 irc.esper.net 上的 #Lolmewn IRC 频道找到我(如果我在线的话,也能获得支持)。在那里见!
Achievements - made by Lolmewn
What does this plugin do?
This plugin allows you to add additional achievements to the game. This plugin requries my other plugin, Stats, to work.
Using this plugin, you can add achievements to the game, and add rewards to them. Whenever a player gets an achievement, you can let commands run, give them money and/or items, and much more using the API this plugin will have.
How do I install this?
Download the latest file from the files page and put it in your plugins folder.
Configuring the plugin
config.yml
There's nothing much to configure here yet. You can toggle whether or not it auto-updates, but that's about it.
achievements.yml
This is where you will store all your achievements. An achievement must have the following layout:
<id> name: YourAchievementName goals: - Stat <amount> <TOTAL or the variables belonging to this Stat> - another one?
The rest of the things is pretty self-explanatory. Once I have time, I will write down a good how-to-write achievements page.
Stats
These are the available Stats:
| Stat | Description | Variables |
|---|---|---|
| Block_break | All broken blocks with their Datavalues | itemId itemData breaking |
| Block_place | All placed blocks with their Datavalues | itemId itemData breaking |
| Death | All deaths with their causes | cause entity(boolean, true is safest) |
| Kill | All kills with their causes | type |
| Move | Walking, sailing, riding a train, on the back of a pig or by horse. | type (0=walk, 1=boat, 2=train, 3=pig, 4=pig in train, 5=horse) |
| Playtime | Time played in seconds | |
| Arrows | Arrows shot | |
| Xp_gained | Total XP gained | |
| Joins | Total times joined | |
| Fish_catched | Total fish Caught | |
| Damage_taken | Total damage taken | |
| Times_kicked | Total times kicked | |
| Tools_broken | Total Tools broken | |
| Eggs_thrown | Total eggs thrown | |
| Items_crafted | Total items crafted | |
| Omnomnom | Total times had a snack | |
| On_fire | Total times being on fire | |
| Words_said | Total words said | |
| Commandsdone | Total commands done | |
| Votes | Total times voted for the server (uses Votifier) | |
| Worldchange | Total times worlds changed | |
| Bucketfill | Total buckets filled | |
| Bucketempty | Total buckets emptied | |
| Bedenter | Total times bed entered | |
| Itemdrops | Total times items dropped | |
| Itempickups | Total times items picked up | |
| Teleports | Total times teleported | |
| Shear | Total times sheared | |
| Lastjoin | The time the player joined the server last | |
| Lastleave | The time the player left the server last |
Want to use a Stat that uses variables? You have to specify either the variables or use 'TOTAL'.
Variables with StatTypes
Some Stats have variables. A good example is Block_break, it has the variables <blockId> <blockData> and <breaking>.
If you want to have a goal where a player must break 5 blue wool blocks, the goal would be
- Block_break 5 35 3 true
If the block has no special blockData (e.g. there's only one type of it), use 0 as blockData. Example:
- Block_break 20 1 0 true
This means break 20 stone blocks.
Examples for the other special Stats:
- Block_place 5 TOTAL - Move 1000 1 #move 1000 blocks with transport type 1 (boat) - Kill 10 Zombie - Death 3 Creeper
The format always is - Stat Amount Total|Variables|<empty>
Item Rewards
The way Item Rewards are written down is somewhat difficult. Basically, you should write it down as
items: <itemId>.<itemData>,<amount>;<itemId>.<itemData>,amount;... etc. items: 35.3,10;1,10 items: 1,20
Note that the itemData doesn't have to be specified
The itemID obvioulsy is the ID the item has (which you can find a full list of here), the itemData is also on that list, and the amount.. well, duhh.
The first example gives you 10 colored wool, and 10 stone. The second example gives you 20 stone.
Example achievements.yml
You can find an example right here. When writing new achievements, I suggest you grab this page and see what all the options do.
Commands and permissions
| Command | Permission | Description |
|---|---|---|
| /ach | achievements.view.self | Check out your progress |
| /ach player <player> | achievements.view.others | Check out someone elses progress |
| /ach reload | achievements.reload | Saves all players and reloads all achievements |
| /ach page <page> | achievements.view.self | Check out page <page> of your progress |
| /ach <achievement> | Check out what the achievement is all about |
Development builds
Development builds of this project can be acquired at the provided continuous integration server.
These builds have not been approved by the BukkitDev staff. Use them at your own risk, they may or may not work at all.
Development builds for Stats can be found at my CI, over at .
Source
Want to help develop, or simply view what makes this plugin run?
Visit my bitbucket!
Metrics
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
If you wish to disable this feature (/me cries), you can do so by opt-ing out, which you can do in the config file under /plugins/PluginMetrics/
Auto-updater
This plugin has a built-in auto-updater, which connects to BukkitDev to check for updates. If you, for some reason, wish to disable this process, you can do so by setting 'update' to false in the plugins' settings file.
IRC Support
You can find me (and possibly, when I'm around, support) in my IRC channel #Lolmewn on irc.esper.net - See you there!
下载 Achievements Reloaded
下载 Achievements Reloaded
下载 Achievements Reloaded
下载 Achievements Reloaded
下载 Achievements Reloaded
下载 Achievements Reloaded
下载 Achievements Reloaded
下载 Achievements Reloaded
下载 Achievements Reloaded
v2.0.0 依赖于 Stats v2.0.0 或更高版本,以及 CB #3034 或更高版本(Stats 也依赖于此)
- 将保存和加载移至 MySQL,而非平面文件。
- 添加 /achievements 命令(别名:/ach)
- 添加 /ach reload
- 使用 UUID 替代玩家名称,因此需要 CB #3034 或更高版本(Stats 运行也需要此条件,因此你应该已具备)
- 在达成成就时添加“广播”选项。
- 修复成就经常未被触发的问题
- 启动小型 API
v0.8
- 修复了未加载的玩家为 null 从而引发错误的问题。
v0.7 此版本适用于 Stats v1.30 或更高版本。
- 修复了与新 Stats 版本相关的所有问题。
- 修复了未发放单个物品奖励的问题。
- 修复更新器以遵循新规范。
v0.6
- 修复了玩家被加载两次的问题
v0.5
- 修复了 Metrics(此处犯了个令人无语的错误)
v0.4
- 修复了在没有提供任何参数(仅 StatType 和数量)的情况下启动时的崩溃问题
- 当 Stats 因某些原因崩溃或未找到时,避免 NPE + NCDFE
- 添加了描述支持(将在后续添加命令时使用)
- 修复了 AutoUpdater
v0.3
- 修复了玩家数据重置的问题。
v0.2
- 修复了玩家数据未保存的问题
- 修复了一些小拼写错误
- 为 Spout 用户添加了“Achievement get!”界面
- 添加了 Metrics
- 添加了自动更新器
v0.1
- 包含了插件的初步功能
- 此版本需要 Stats v1.23
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
评论 0
登录后参与评分
还没有评论,来抢沙发吧