NoMHPlugins
在服务器启动时自动禁用 Minehut 内置的插件(如 MinehutCosmetics 和 MinehutFilter),无需面板访问权限,无需在其端编辑配置文件,也无需重启即可管理。
Minehut 默认会在每个服务器上安装其自带的几个插件,而这些插件通常没有可靠的在游戏内切换开关(且根据服务器状态,面板上的切换按钮可能不稳定或呈灰色不可用)。NoMHPlugins 通过最干净的方式解决了这个问题:它调用 Bukkit 自身的 PluginManager#disablePlugin() 方法——这正是服务器正常卸载插件时所使用的方法。不涉及反射技巧、不取消事件 hack、不修改其他插件的文件。它只是告诉服务器“该插件已关闭”,就像服务器自己操作一样。
功能
- 启动时自动禁用插件 — 无需每次服务器重启时都运行命令。
- 完全可配置的目标列表 — 默认为
MinehutCosmetics 和 MinehutFilter,但你可以根据名称添加或删除任何插件。
- 在所有其他插件加载后运行 — 在启动后等待恰好一个 tick,确保所有其他插件(包括你正在针对的插件)都已初始化完毕后再执行操作。
- 实时管理,无需重启 — 可以从游戏内或控制台添加新目标、重新运行禁用流程,或检查当前已加载的内容。
- 设计安全 — 如果目标插件未安装或其名称不匹配,则会被跳过并记录日志。不会影响服务器上的任何其他内容。
命令
| 命令 |
描述 |
/nomh list |
列出服务器上当前加载的所有插件及其启用状态 — 在使用前请使用此命令获取精确(区分大小写)的插件名称。 |
/nomh disable <pluginName> |
将插件添加到永久目标列表并立即禁用它。 |
/nomh rerun |
对目标列表中当前所有内容重新运行禁用流程 — 如果某些插件在未重启的情况下被重新启用,此命令非常有用。 |
权限:nomhplugins.admin(默认为 op)。
安装
- 将
NoMHPlugins.jar 放入你的 /plugins 文件夹中。
- 重启 你的服务器(仅
/reload 不够 — 完整重启可确保正确的插件加载顺序)。
- 在控制台日志中检查确认行,例如
Disabled 'MinehutCosmetics'.
配置
目标列表位于 config.yml 中,默认内容为:
target-plugins:
- MinehutCosmetics
- MinehutFilter
你可以直接编辑文件并重启服务器,或者直接使用 /nomh disable <name> 动态添加插件 — 对此操作无需重启。
注意事项
- 插件名称区分大小写,必须与 Bukkit 报告的名称完全匹配。请使用
/nomh list 而非猜测。
- 这仅在内存中禁用目标插件(针对当前服务器会话)— 不会删除或修改其文件。如果你的主机在未来的重启中重新启用了它,NoMHPlugins 将在每次启动时安静地再次自动禁用它。
NoMHPlugins
Automatically disables Minehut's bundled plugins — like MinehutCosmetics and MinehutFilter — the moment your server starts, with no panel access, no config editing on their end, and no restarts required to manage it.
Minehut installs a handful of its own plugins on every server by default, and there's often no reliable in-game toggle for them (and the panel toggle can be finicky or grayed out depending on your server's state). NoMHPlugins solves this the clean way: it calls Bukkit's own PluginManager#disablePlugin() — the exact same method the server itself uses when a plugin is unloaded normally. No reflection tricks, no event-cancelling hacks, no editing other plugins' files. It just tells the server "this plugin is off," the same way the server would do it itself.
Features
- Disables plugins automatically on startup — no need to run a command every time your server restarts.
- Fully configurable target list — defaults to
MinehutCosmetics and MinehutFilter, but you can add or remove any plugin by name.
- Runs after everything else has loaded — waits exactly one tick after startup, guaranteeing every other plugin (including the ones you're targeting) has already finished initializing before it acts.
- Live management, no restart needed — add new targets, re-run the disable pass, or check what's currently loaded, all from in-game or console.
- Safe by design — if a targeted plugin isn't installed or its name doesn't match, it's simply skipped and logged. Nothing else on your server is touched.
Commands
| Command |
Description |
/nomh list |
Lists every plugin currently loaded on the server and whether it's enabled — use this to get the exact (case-sensitive) plugin name before targeting it. |
/nomh disable <pluginName> |
Adds a plugin to the permanent target list and disables it immediately. |
/nomh rerun |
Re-runs the disable pass for everything currently in the target list — handy if something got re-enabled without a restart. |
Permission: nomhplugins.admin (defaults to op).
Installation
- Drop
NoMHPlugins.jar into your /plugins folder.
- Restart your server (a
/reload isn't enough — a full restart guarantees the correct plugin load order).
- Check your console log for confirmation lines like
Disabled 'MinehutCosmetics'.
Configuration
The target list lives in config.yml and defaults to:
target-plugins:
- MinehutCosmetics
- MinehutFilter
Edit it directly and restart, or just use /nomh disable <name> to add a plugin on the fly — no restart needed for that.
Notes
- Plugin names are case-sensitive and must match exactly what Bukkit reports. Use
/nomh list instead of guessing.
- This disables the target plugin in memory for that server session — it doesn't delete or modify its files. If your host re-enables it on a future restart, NoMHPlugins will just quietly disable it again automatically every time it starts.
评论 0
登录后参与评分
还没有评论,来抢沙发吧