PistonDupes
PistonDupes 是一个适用于 Purpur/Paper 的插件,通过修改 Paper 的全局配置来自动启用基于活塞的复制机制。
当服务器启动时,该插件会执行以下操作:
-
查找:
config/paper-global.yml
-
在文件中搜索:
allow-piston-duplication:
-
如果找到:
allow-piston-duplication: false
则将其更改为:
allow-piston-duplication: true
-
在进行修改之前,它会创建:
作为原始配置的备份。
-
它不依赖特定的行号,因此即使设置项不在第 136 行,插件也能正常工作。
-
如果活塞复制功能已经启用:
allow-piston-duplication: true
插件将不会进行任何更改。
-
如果找不到该设置项,它会在服务器控制台中报告警告,而不是修改其他无关的配置。
-
成功更改文件后,它会告知服务器管理员,需要重启服务器才能让 Paper/Purpur 加载新的设置。
该设置的作用
该插件本身并不实现具体的复制机制。它仅仅是启用了 Paper 的 allow-piston-duplication 设置,从而允许由服务器支持的基于活塞的复制机制,这可能包括以下内容:
- 铁轨复制
- TNT 复制
- 地毯复制
- 其他依赖此 Paper 设置的基于活塞的复制机制
因此,该插件本质上是一个用于管理 Paper 活塞复制设置的自动配置工具,而非自定义的铁轨/TNT/地毯复制实现。
PistonDupes
PistonDupes is a Purpur/Paper plugin that automatically enables piston-based duplication mechanics by modifying Paper's global configuration.
When the server starts, the plugin:
-
Looks for:
config/paper-global.yml
-
Searches the file for:
allow-piston-duplication:
-
If it finds:
allow-piston-duplication: false
it changes it to:
allow-piston-duplication: true
-
Before making the modification, it creates:
config/paper-global.yml.backup
as a backup of the original configuration.
-
It does not rely on a specific line number, so it continues to work even if the setting moves somewhere other than line 136.
-
If piston duplication is already enabled:
allow-piston-duplication: true
the plugin makes no changes.
-
If the setting cannot be found, it reports a warning in the server console instead of modifying unrelated configuration.
-
After successfully changing the file, it tells the server administrator that a server restart is required for Paper/Purpur to load the new setting.
What the setting enables
The plugin itself doesn't implement individual duplication mechanics. It simply enables Paper's allow-piston-duplication setting, allowing piston-based duplication mechanics supported by the server, which can include things such as:
- Rail duplication
- TNT duplication
- Carpet duplication
- Other piston-based duplication mechanics that depend on this Paper setting
So the plugin is essentially an automatic configuration manager for Paper's piston-duplication setting, rather than a custom rail/TNT/carpet duplication implementation.
评论 0
登录后参与评分
还没有评论,来抢沙发吧