GitHub
如果你有任何问题或 Bug,请随时加入这个 Discord 服务器 ---
? EnchantRestrictor
一款高性能、先进的 Minecraft Spigot/Paper 服务器插件,提供对服务器经济系统中附魔矩阵的动态限制、控制和审计映射。该插件从零开始设计,旨在防止服务器通胀,管理强大的附魔路径,并以无与伦比的精度记录玩家活动。
✨ 核心功能
- 模块化管理 GUI 面板 (
/enchantrestrict gui):一个可视化控制中心,用于在游戏中动态重载配置文件、切换安全模式、更改行为策略以及管理被禁止的附魔列表。
- 附魔台拦截:实时拦截附魔台roll(随机生成)。自动检查权限并应用配置的缓解路径:
REMOVE:静默排除并从 roll 结果中移除禁止的附魔。
REPLACE_BY_CLEAN:如果 roll 出被阻止的附魔,则完全清除所有附魔并清理物品的魔法元数据。
- 村民交易拦截:动态阻止、替换或适应交易循环。如果村民列出被禁用的书或物品,支持多种操作:
REPLACE:将禁用的卷轴替换为安全且实用的 经验修补 (Unbreaking) 替代品。
REMOVE_TRADE:从村民的物品栏中彻底安全地清除目标交易选项。
HIGH_PRICE:通过可配置的价格乘数天文数字般地增加绿宝石成本。
CLEAR_BOOK:净化交易,将受限的附魔书物品变为标准的空白书。
- 异步审计日志(本地 SQLite / 中央 MySQL):内置异步数据库集成钩子。保持清晰的持久化记录,包括玩家违规、被阻止的附魔台 roll 和被拒绝的村民交易,而不会导致任何刻率下降或主线程锁定。
- 高级音频声音矩阵 (
sound.yml):完全自定义的听觉映射文件。更改、放大或静音特定插件操作、界面点击和事件触发的音效(音量、音高)。
- 动态语言引擎与 HEX 格式化:即时更改语言文件。原生支持 RGB 十六进制颜色格式 (
&#RRGGBB 和 Adventure 标签),以呈现引人注目的聊天覆盖效果。
? 命令参考与指令
所有管理子命令都需要 enchantrestrictor.admin 权限。自动补全会动态建议命令。
| 命令 |
描述 |
示例 |
/enchantrestrict gui |
打开视觉管理界面(控制面板、规则矩阵、等级选择器)。 |
/enchantrestrict gui |
/enchantrestrict list |
列出当前对附魔台和交易的所有受限附魔。 |
/enchantrestrict list |
/enchantrestrict reload |
热重载配置文件、音频文件和翻译矩阵。 |
/enchantrestrict reload |
/enchantrestrict toggle <table/trade> |
立即开启或关闭特定的过滤隔间。 |
/enchantrestrict toggle table |
/enchantrestrict add <table/trade> <enchant> |
将原版附魔键添加到禁用列表中。 |
/enchantrestrict add trade mending |
/enchantrestrict remove <table/trade> <enchant> |
解除特定附魔的限制。 |
/enchantrestrict remove table infinity |
/enchantrestrict give [player] [enchant] [level] |
给予管理员卷轴(使用等级 0 作为移除卷轴)。 |
/enchantrestrict give Notch sharp 5 |
/enchantrestrict clear [player] [enchant] |
硬清除并净化玩家物品上的特定附魔。 |
/enchantrestrict clear Notch knockback |
? 创意游戏内 GUI
EnchantRestrictor 提供了精美触觉感的用户界面。运行 /enchantrestrict gui 会触发定制的开场视觉铃声,并打开一个分层的交互式箱子屏幕:
- 管理控制面板:
- 切换附魔台保护、村民过滤器或绕过选项。
- 调整附魔台操作(REMOVE / REPLACE_BY_CLEAN)和村民行动策略。
- 一键重载配置文件。
- 模块化规则矩阵编辑器:
- 以魔法附魔书的形式显示所有注册的原版附魔。
- 左键单击书籍以切换其附魔台禁令。
- 右键单击书籍以切换其村民交易禁令。
? 权限节点
管理节点
enchantrestrictor.admin:运行管理命令、访问标准视觉面板、接收调试列表和执行手动绕过的权限。
交互式绕过权限
在 config.yml 中设置 general.enable-permissions: true 以授权组或个人进行绕过机制:
| 权限节点 |
授权的绕过操作 |
enchantrestrictor.bypass.table |
绕过所有附魔台限制。 |
enchantrestrictor.bypass.table.<enchantment> |
绕过特定的附魔台规则(例如 enchantrestrictor.bypass.table.mending)。 |
enchantrestrictor.bypass.trade |
绕过所有村民交易限制。 |
enchantrestrictor.bypass.trade.<enchantment> |
绕过特定的村民交易规则(例如 enchantrestrictor.bypass.trade.efficiency)。 |
⚙️ 配置手册
config.yml(核心引擎设置)
配置常规选项和路径:
general:
# 切换活跃物品栏周围视觉魔法粒子生成
use-particles: true
# 切换通用自定义音效矩阵
use-sounds: true
# 检查并强制执行绕过权限规则
enable-permissions: true
# 在服务器控制台中启用深度跟踪详细信息
debug: false
数据库集成
在 database 配置块下,安全地配置基于文件或集中式存储的配置文件:
database:
# 支持的类型:"SQLITE"(打包本地文件)或 "MYSQL"(集中式数据库)
type: "SQLITE"
mysql:
host: "localhost"
port: 3306
database: "enchantrestrictor"
username: "root"
password: ""
? 样式与本地化支持
插件支持多种配色方案:
- 十六进制颜色代码:
&#FF5555 / FF34
- Adventure 格式:
<color:#FF5555>Sparks</color> 或 <gold>&b&l
- 传统颜色代码:标准格式化符号,如
&c、&a、&f。
本地化语言文件开箱即用,位于:
messages_en.yml(英语)
messages_ru.yml(俄语)
GitHub
If do u have some issue/bug i am all the time is this discord server ---
? EnchantRestrictor
A highly performant, advanced Minecraft Spigot/Paper server plugin offering dynamic restriction, control, and audit mapping of enchantment matrices across the server's economy. Designed from the ground up to prevent server inflation, manage powerful enchantment paths, and log player activities with unparalleled precision.
✨ Core Features
- Modular Administration GUI Panel (
/enchantrestrict gui): A visual control center to hot-reload config files, toggle safety modes, alter behavior policies, and manage banned enchantment lists dynamically in-game.
- Enchantment Table Interception: Intercepts enchantment table rolls in real-time. Automatically checks permissions and applies configured mitigation pathways:
REMOVE: Silently excludes and strips forbidden enchantments from the roll.
REPLACE_BY_CLEAN: Completely wipes all enchantments and clears the item's magical metadata if a blocked enchantment is rolled.
- Villager Trade Interceptions: Block, replace, or adapt trading loops dynamically. Supports multiple actions if a villager lists a blocked book or item:
REPLACE: Swaps forbidden scrolls with safe, useful Unbreaking alternatives.
REMOVE_TRADE: Securely purges the targeted trade option entirely from the villager's inventory.
HIGH_PRICE: Astronomically inflates the emerald cost by a configurable price multiplier.
CLEAR_BOOK: Sanitizes trading, turning the restricted enchanted book item into a standard blank book.
- Asynchronous Audit Logs (Local SQLite / Central MySQL): Built-in asynchronous database integration hooks. Keeps clean persistent records of player infractions, blocked table rolls, and rejected villager trades without causing any tick-rate or main-thread locking.
- Premium Audio Sound Matrix (
sound.yml): Fully custom auditory mapping files. Alter, amplify, or mute sound effects (volume, pitch) for distinct plugin actions, interface clicks, and event triggers.
- Dynamic Language Engine & HEX Formatting: Change language files on-the-fly. Natively supports RGB hex color format (
&#RRGGBB and Adventure tags) for striking chat overlays.
? Command Reference & Commands
All administrative subcommands require the enchantrestrictor.admin permission. Auto-complete suggests commands dynamically.
| Command |
Description |
Example |
/enchantrestrict gui |
Opens the Visual Admin Interface (Control Panel, Rule Matrix, Level Picker). |
/enchantrestrict gui |
/enchantrestrict list |
Lists all currently restricted enchantments for Tables and Trades. |
/enchantrestrict list |
/enchantrestrict reload |
Hot-reloads configuration profiles, audio files, and translation matrices. |
/enchantrestrict reload |
/enchantrestrict toggle <table/trade> |
Toggles specific filter compartments on/off instantly. |
/enchantrestrict toggle table |
/enchantrestrict add <table/trade> <enchant> |
Appends a vanilla enchantment key to the ban list. |
/enchantrestrict add trade mending |
/enchantrestrict remove <table/trade> <enchant> |
Lifts restrictions of a specific enchantment. |
/enchantrestrict remove table infinity |
/enchantrestrict give [player] [enchant] [level] |
Gives an Admin Scroll (use level 0 for a Remover Scroll). |
/enchantrestrict give Notch sharp 5 |
/enchantrestrict clear [player] [enchant] |
Hard-clears and purges specific enchantments from player items. |
/enchantrestrict clear Notch knockback |
? Creative In-Game GUI
EnchantRestrictor provides a beautifully tactile UI. Running /enchantrestrict gui triggers a customized opening visual chime and opens a layered, interactive chest screen:
- Administrative Controls Panel:
- Toggle table protection, villager filters, or bypass options.
- Adjust table actions (REMOVE / REPLACE_BY_CLEAN) and villager action policies.
- Reload config files with a single click.
- Modular Rule Matrix Editor:
- Displays all registered vanilla enchantments as magical enchanted books.
- Left-Click a book to toggle its Enchantment Table Ban.
- Right-Click a book to toggle its Villager Trade Ban.
? Permission Nodes
Administrative Node
enchantrestrictor.admin: Permission to run admin commands, access standard visual panels, receive debug listings, and perform manual bypasses.
Interactive Bypass Permissions
Set general.enable-permissions: true in config.yml to authorize bypass mechanics for groups or individuals:
| Permission Node |
Authorized Bypass Action |
enchantrestrictor.bypass.table |
Bypass all Enchantment Table restrictions. |
enchantrestrictor.bypass.table.<enchantment> |
Bypass a specific Enchantment Table rule (e.g., enchantrestrictor.bypass.table.mending). |
enchantrestrictor.bypass.trade |
Bypass all Villager Trade restrictions. |
enchantrestrictor.bypass.trade.<enchantment> |
Bypass a specific Villager Trade rule (e.g., enchantrestrictor.bypass.trade.efficiency). |
⚙️ Configuration Manual
config.yml (Core Engine Settings)
Configure general options and pathways:
general:
# Toggle visual magic visual particle spawns around active inventories
use-particles: true
# Toggle general custom sound effects matrix
use-sounds: true
# Check and enforce bypass permission rules
enable-permissions: true
# Enable deep tracing details in the server console
debug: false
Database Integration
Configure file-based or centralized storage profiles securely under the database block:
database:
# Supported types: "SQLITE" (packaged local file) or "MYSQL" (central database)
type: "SQLITE"
mysql:
host: "localhost"
port: 3306
database: "enchantrestrictor"
username: "root"
password: ""
? Styling & Localization support
The plugin supports diverse color schemes:
- Hex Color Code:
&#FF5555 / FF34
- Adventure Formatting:
<color:#FF5555>Sparks</color> or <gold>&b&l
- Legacy Colors: Standard formatting such as
&c, &a, &f.
Localized language sheets are ready-to-use in:
messages_en.yml (English)
messages_ru.yml (Russian)
评论 0
登录后参与评分
还没有评论,来抢沙发吧