CraftItem
使用更多样化的锻造方式 折磨 取悦你的玩家!
默认配置为中文。如需英文或其他语言,请查看 localization 仓库。
Features
为何选择这个重制版
- 功能丰富:原版插件已经消耗了玩家大量时间并让他们时刻处于紧张状态。我们添加了一个更具挑战性的自定义钓鱼迷你游戏锻造模式,以及一个只需耐心的基于时间的锻造模式。其功能比原版更完整。
- 运行稳定:该插件已在作者服务器上运行近两年,而带有新锻造模式的版本已稳定运行近一年,未出现任何问题。它也是作者服务器上的标志性插件之一。出现问题时保证修复。
- Bug 修复:原版插件的代码混乱不堪。从
2.0.0 版本开始,我们使用 PluginBase 框架重构了大量代码,大大提高了开发效率。在这个重制版中,我们还修复了诸如副手持有物品时不消耗材料等严重 Bug。
- 对开发者友好:插件保持开源,重制版添加了如
MaterialDisappearEvent 等对开发者友好的事件。通过取消此事件,可以在玩家遭遇重大失败时防止珍贵材料被销毁。当然,新版本也包含了防止销毁的配置选项,应能满足大多数用例。
- 插件集成:支持与经济系统和占位符插件的基本集成。还支持与 MMOItems 等插件的集成,通过特定插件的物品 ID 而非完整的物品数据来识别材料!(目前支持 MMOItems、MythicMobs、ItemsAdder 等 兼容性代码在此。欢迎贡献以支持更多插件!)
- 还有更多……我忘了!
高度可定制的 GUI
参见配置文件:Gui.yml (Github)
自由编辑图标位置、为自定义纹理添加 CustomModelData、点击时执行命令、在命令中使用 PAPI 变量等等。
Commands / Permissions
每个子命令对应权限 craftitem.command.<subcommand>,例如 craftitem.command.open。通常,玩家不需要任何权限。
你可以使用菜单插件并执行控制台命令 ci open <RecipeID> [Player] 来为玩家打开锻造界面。
以下命令中,<> 表示必需参数,[] 表示可选参数。输入命令时不要包含方括号。
/ci category <Category> [Player] 为自己/其他玩家打开分类界面
/ci open <RecipeID> [Player] 为自己/其他玩家打开锻造界面
/ci get <RecipeID> [Player] 将自己/其他玩家的锻造奖励发放给自己/其他玩家
/ci create <RecipeID> 创建锻造配方
/ci delete <RecipeID> 删除锻造配方
/ci edit <RecipeID> 编辑锻造配方
/ci reload 重新加载配置文件
如果启用了 Setting.RequirePermission(默认启用),打开锻造界面还需要权限 craftitem.open.<RecipeID>。
Mode Description
本插件有三种锻造模式。了解每种模式的工作原理将帮助你更灵活地使用本插件。
1. 普通锻造模式
与硬核锻造冲突。当 Hard Forging 禁用时可用。
在此模式下,玩家必须在背包中放置所有所需材料,然后点击锻造按钮。费用扣除成功后,锻造开始。每次尝试都会扣除费用,但不会立即消耗材料。然而,存在一种情况:锻造结束后可能会扣除材料——见下文。
首先,插件随机生成一个强度值:Small(小)、Medium(中)或 Large(大),对应配方配置中的三个乘数。
会显示一段时间的 “铛铛” / “锻造” 标题。
然后,插件根据配置的成功率判定结果。
如果成功,根据强度不同,可能是轻微成功、成功或重大成功,锻造进度相应增加对应的乘数倍。
如果失败,可能是轻微失败、失败或重大失败,锻造进度相应减少。
如果强度为重大失败,玩家将随机丢失一件材料。这是原版插件中最折磨人——也最刺激的部分。
在此模式下,锻造不能在一次尝试中直接产出最终物品。玩家必须多次锻造直到**进度达到 100%**才能获得最终产品。
获得最终产品时,玩家背包中的所有材料都会被消耗。
提示
将乘数设置为 100 100 100 并将成功率设置为 100,则锻造一次即可成功,立即获得最终产品。
(经典锻造逻辑——既然普通锻造已经可以实现这一点,就不需要单独的模式了。)
2. 基于时间的锻造模式 (重制版新增)
与普通锻造和硬核锻造共存。当 Forge Duration 设置为特定时间时可用。
在此模式下,玩家必须在背包中放置所有所需材料并点击锻造按钮。费用扣除成功后,锻造开始。这次,插件将立即从玩家背包中移除所有材料并记录开始时间。
玩家可以在菜单中查看当前的锻造进度。当经过的时间达到配置的锻造时长时,进度将达到 100%,此时玩家可以从锻造界面领取最终成品。
3. 困难锻造模式 (重制版新增)
与正常锻造互斥。仅在 Hard Forging(困难锻造)启用时可用。
此模式几乎与正常锻造完全相同,仅有一处关键区别。
在困难锻造中,在进入以下步骤之前:
“然后根据配置的成功率判定是否成功”,
流程会被中断。“铛铛”标题将被取消,并替换为一个自定义钓鱼小游戏。
如果小游戏成功,流程将从中断处继续,并判定锻造是否成功。
如果小游戏失败,锻造将立即结束,并计为失败。
困难锻造还会随机生成一个强度值,该值会影响锻造进度的增减。
有趣之处在于:即使小游戏成功,锻造仍可能失败,如本帖最后一张图所示。
若小游戏失败,锻造必定失败。
这也是它被称为“困难锻造”的原因。
本质上,这是在正常锻造开始前添加了一个相当难的“验证码”。如果你在“随机游戏设置”中配置了极具挑战性的游戏,即使是人类也可能难以通过。
提示
与正常锻造类似,将倍率和成功率均设置为 100,玩家只需完成一次小游戏即可获得锻造物品。
希望你和你的玩家们玩得开心! :)
CraftItem
Use more diverse forging methods to torment delight your players!
Default configurations are in Chinese. Check localization repository for English or other language.
Features
Why Choose This Remastered Version
- Feature-Rich: The original plugin already consumed a lot of players’ time and kept them on edge. We’ve added a more challenging Custom-Fishing mini-game forging mode, as well as a time-based forging mode that only requires patience. It’s more feature-complete than the original.
- Stable Operation: This plugin has been running on the author’s server for nearly two years, and the version with the new forging modes has been running for almost a year without issues. It’s also one of the signature plugins of the author’s server. Bug fixes are guaranteed when problems arise.
- Bug Fixes: The original plugin’s code was a mess. Starting from
2.0.0, we refactored a large portion of the codebase using the PluginBase framework, greatly improving development efficiency. In this remastered version, we also fixed serious bugs such as materials not being consumed when held in the off-hand.
- Developer-Friendly: The plugin remains open-source, and the remastered version adds developer-friendly events such as
MaterialDisappearEvent. By canceling this event, you can prevent valuable materials from being destroyed when a player encounters a major failure. Of course, the new version also includes configuration options to prevent destruction, which should satisfy most use cases.
- Plugin Integration: Supports basic integration with economy and placeholder plugins. It also supports integration with plugins such as MMOItems, identifying materials by specific plugin item IDs instead of the full item data! (Currently supports MMOItems, MythicMobs, ItemsAdder, etc. Compatibility code here. Contributions for additional plugin support are welcome!)
- And more… I forgot!
Highly Customizable GUI
See the configuration file: Gui.yml (Github)
Freely edit icon positions, add CustomModelData for custom textures, execute commands on click, use PAPI variables in commands, and more.
Commands / Permissions
Each subcommand corresponds to the permission craftitem.command.<subcommand>, such as craftitem.command.open. Generally, players do not need any permissions.
You can use a menu plugin and execute the console command ci open <RecipeID> [Player] to open the forging interface for a player.
In the following commands, <> indicates required parameters and [] indicates optional parameters. Do not include the brackets when typing commands.
/ci category <Category> [Player] Open the category interface for yourself/another player
/ci open <RecipeID> [Player] Open the forging interface for yourself/another player
/ci get <RecipeID> [Player] Give the forging reward to yourself/another player
/ci create <RecipeID> Create a forging recipe
/ci delete <RecipeID> Delete a forging recipe
/ci edit <RecipeID> Edit a forging recipe
/ci reload Reload configuration files
If Setting.RequirePermission is enabled (enabled by default), opening a forging interface also requires the permission craftitem.open.<RecipeID>.
Mode Description
This plugin has three forging modes. Understanding how each mode works will help you use the plugin more flexibly.
1. Normal Forging Mode
Conflicts with Hard Forging. Available when Hard Forging is disabled.
In this mode, players must place all required materials in their inventory, then click the forge button. After the cost is deducted successfully, forging begins. Each attempt deducts the fee but does not consume materials immediately. However, there is a situation where materials may be deducted after forging ends—see below.
First, the plugin randomly generates an intensity value: Small, Medium, or Large, corresponding to three multipliers set in the recipe configuration.
A “Clang Clang” / “Forging” title is displayed for a period of time.
Then, the plugin determines success based on the configured success rate.
If successful, depending on the intensity, it may be Minor Success, Success, or Major Success, increasing the forging progress by the corresponding multiplier.
If failed, it may be Minor Failure, Failure, or Major Failure, decreasing the forging progress accordingly.
If the intensity is Major Failure, the player will randomly lose one material. This is the most torturous—and exciting—part of the original plugin.
In this mode, forging cannot produce the final item in one attempt. Players must forge multiple times until the progress reaches 100% to obtain the final product.
When the final product is obtained, all materials in the player’s inventory are consumed.
Tip
Set the multipliers to 100 100 100 and the success rate to 100, and forging will succeed in one attempt, immediately granting the final product.
(Classic forging logic—since Normal Forging can already achieve this, there’s no need for a separate mode.)
2. Time-Based Forging Mode (New in Remastered Version)
Coexists with Normal and Hard Forging modes. Available when Forge Duration is set to a specific time.
In this mode, players must place all required materials in their inventory and click the forge button. After the cost is deducted successfully, forging begins. This time, the plugin will immediately remove all materials from the player’s inventory and record the start time.
Players can view the current forging progress in the menu. Once the elapsed time reaches the configured forge duration, progress reaches 100%, and the player can claim the final product from the forging interface.
3. Hard Forging Mode (New in Remastered Version)
Conflicts with Normal Forging. Available when Hard Forging is enabled.
This mode is almost identical to Normal Forging, with only one key difference.
In Hard Forging, before reaching the step:
“Then determine success based on the configured success rate,”
the process is interrupted. The “Clang Clang” title is canceled and replaced with a Custom-Fishing mini-game.
If the mini-game succeeds, the process resumes from the interrupted point and determines forging success.
If the mini-game fails, forging ends immediately and is counted as a failure.
Hard Forging also randomly generates an intensity value, which affects the increase or decrease of forging progress.
The fun part is: even if the mini-game succeeds, forging can still fail, as shown in the last image of this post.
If the mini-game fails, forging will definitely fail.
That’s why it’s called “Hard Forging.”
It’s essentially adding a fairly difficult “CAPTCHA” before Normal Forging begins. If you configure extremely challenging mini-games in the “Random Game Settings,” even humans might struggle to pass.
Tip
Similar to Normal Forging, set both multipliers and success rate to 100, and players only need to complete the mini-game once to obtain the forged item.
Hope you and your players have fun! :)
评论 0
登录后参与评分
还没有评论,来抢沙发吧