BukkitAPI-Translation-Group / Chinese_BukkitAPI

BukkitAPI 中文文档 (版本 Spigot-API 1.21)
https://bukkit.windit.net/javadoc/
143 stars 37 forks source link

关于Command#setAliases的翻译 #33

Closed William-Shi233 closed 3 years ago

William-Shi233 commented 3 years ago

目前的翻译是 https://github.com/BukkitAPI-Translation-Group/Chinese_BukkitAPI/blob/d124d4df3f7f0316c5d46947f88e55a5d363253a/BukkitApi/org/bukkit/command/Command.java#L393

设置这个命令的别名. 若没在PluginDescriptionFile.getCommands()的 aliases 节点定义(就是没在plugin.yml定义)将没有效果,与此等效.

原文是

This is not effective outside of defining aliases in the PluginDescriptionFile.getCommands() (under the `aliases' node) is equivalent to this method.

但是我感觉此处原文并不是很通顺。This is not effective ... is equivalent 是不是存在多个谓语动词?

另,参考了 https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/plugin/PluginDescriptionFile.html#getCommands()

Aliases are not effective when defined at runtime, so the plugin description file is the only way to have them properly defined.

因此此处的句意大致应当是如果不在 plugin.yml 内定义则无效。(经测试,确实无效) 而最后的 equivalent to this method 含义不能清晰表达,建议翻译时删去"与此等效"。