MaxEnchant
一个轻量级的 Minecraft Bukkit/Spigot 插件,可为物品附魔最高生存模式可获得的(原版)附魔。
描述
MaxEnchant 会自动为物品添加所有适用的正面附魔,同时尊重原版兼容性和互斥附魔规则。它排除了诅咒类附魔,并使用优先级顺序来解决冲突(例如:锋利 vs 击退、效率 vs 精准采集)。
功能
- 为主手物品应用最高生存模式可获得的附魔。
- 通过一条命令为玩家整个背包(包括护甲和副手)应用最高附魔。
- 尊重原版附魔冲突并排除诅咒(绑定诅咒与消失诅咒)。
- 针对互斥附魔设有优先级顺序(在代码中配置)。
- 支持
inv 参数的 Tab 补全。
- 消息带有颜色,现代服务器版本支持十六进制颜色。
命令
/maxenchant (别名: /maxench, /enchantmax)
- 无参数:为主手持有的物品附魔。
inv:为玩家背包、护甲及副手中的所有可附魔物品附魔。
示例:
/maxenchant — 将手持物品的附魔拉满。
/maxench inv — 将整个背包的附魔拉满。
权限
maxenchant.use — 运行该命令所需的权限(默认:OP)。
安装
- 构建插件(使用 Gradle/Maven 或使用
build/libs 中提供的 JAR 文件)。
- 将生成的
MaxEnchants-<version>.jar 放入服务器的 plugins/ 文件夹中。
- 启动或重启服务器。
插件主类和命令在 plugin.yml 中声明:
- main:
vadlox.dev.maxEnchants.MaxEnchants
- api-version:
1.19
配置
所有用于解决冲突的偏好设置均在代码中定义(即 getPreferenceOrder() 方法)。如果你希望有不同的优先级规则,请编辑该方法并重新编译。
开发
- Java 17+(根据服务器版本推荐)。
- 该项目使用 Bukkit/Spigot API。
使用 Gradle 构建(示例):
./gradlew build(Windows 系统上使用 gradlew.bat build)
故障排除
- 如果命令无效,请验证你是否拥有
maxenchant.use 权限或是 OP。
- 如果某些物品未应用附魔,可能是因为根据原版规则这些物品与该附魔不兼容。
贡献
欢迎提交 Pull Requests 和 Issue。如有需要,请调整优先级顺序或改进兼容性处理。
许可证
在此文件中或单独的 LICENSE 文件中包含你选择的许可证。(默认情况下未指定许可证。)
MaxEnchant
A lightweight Minecraft Bukkit/Spigot plugin that applies the highest survival-obtainable (vanilla) enchantments to items.
Description
MaxEnchant automatically adds all applicable positive enchantments to items while respecting vanilla compatibility and mutually exclusive enchantments. It excludes cursed enchantments and uses a preference order to resolve conflicts (for example, Sharpness vs Smite, Fortune vs Silk Touch).
Features
- Apply maximum survival-obtainable enchantments to the item in your main hand.
- Apply max enchantments to the entire player inventory (including armor and offhand) with a single command.
- Respects vanilla enchantment conflicts and excludes curses (Binding & Vanishing).
- Preference order for mutually exclusive enchantments (configured in code).
- Tab-completion for the inventory argument (
inv).
- Colorized messages with hex color support for modern server versions.
Commands
/maxenchant (aliases: /maxench, /enchantmax)
- No args: enchants the item in your main hand.
inv: enchants all enchantable items in the player's inventory, armor, and offhand.
Examples:
/maxenchant — max out enchantments for the held item.
/maxench inv — max out enchantments for the entire inventory.
Permissions
maxenchant.use — required to run the command (default: op).
Installation
- Build the plugin (Gradle/Maven or use the provided JAR in
build/libs).
- Place the produced
MaxEnchants-<version>.jar into your server's plugins/ folder.
- Start or restart the server.
Plugin main class and command are declared in plugin.yml:
- main:
vadlox.dev.maxEnchants.MaxEnchants
- api-version:
1.19
Configuration
All preferences for conflict resolution are defined in code (the getPreferenceOrder() method). If you want different priority rules, edit that method and recompile.
Development
- Java 17+ recommended depending on your server build.
- The project uses the Bukkit/Spigot API.
Building with Gradle (example):
./gradlew build (or gradlew.bat build on Windows)
Troubleshooting
- If the command does nothing, verify you have
maxenchant.use permission or are OP.
- If enchantments are not applied to certain items, they may not be compatible with those enchantments according to vanilla rules.
Contributing
Pull requests and issues are welcome. Adjust preference ordering or improve compatibility handling as needed.
License
Include your preferred license in this file or in a separate LICENSE file. (No license is specified by default.)
评论 0
登录后参与评分
还没有评论,来抢沙发吧