public interface HelpMap
addTopic()
添加主题
HelpTopicFactory
帮助主题工厂对象的注册插件命令,来创建主题
原文:The HelpMap tracks all help topics registered in a Bukkit server. When the server starts up or is reloaded, help is processed and topics are added in the following order:
addTopic()
HelpTopicFactory
objects to create topics
限定符和类型 | 方法和说明 |
---|---|
void |
addTopic(HelpTopic topic)
把主题添加到服务器的帮助索引。
|
void |
clear()
清除帮助索引的内容。
|
HelpTopic |
getHelpTopic(java.lang.String topicName)
获取指定主题名称的帮助主题。
|
java.util.Collection<HelpTopic> |
getHelpTopics()
获得所有注册过的帮助主题集合。
|
java.util.List<java.lang.String> |
getIgnoredPlugins()
获取服务器管理者选择从帮助索引中排除的插件列表。
|
void |
registerHelpTopicFactory(java.lang.Class<?> commandClass,
HelpTopicFactory<?> factory)
关联一个HelpTopicFactory对象到指定的命令基类。
|
HelpTopic getHelpTopic(java.lang.String topicName)
原文:Returns a help topic for a given topic name.
topicName
- 按名称查找帮助主题。HelpTopic
对象,如果没有则返回null。java.util.Collection<HelpTopic> getHelpTopics()
原文:Returns a collection of all the registered help topics.
void addTopic(HelpTopic topic)
原文:Adds a topic to the server's help index.
topic
- 要添加的帮助主题.void clear()
原文:Clears out the contents of the help index. Normally called during server reload.
void registerHelpTopicFactory(java.lang.Class<?> commandClass, HelpTopicFactory<?> factory)
原文:Associates a HelpTopicFactory
object with given command base
class. Plugins typically call this method during onLoad()
. Once
registered, the custom HelpTopicFactory will be used to create a custom
HelpTopic
for all commands deriving from the commandClass
base class, or all commands deriving from PluginCommand
who's executor derives from commandClass
base class.
commandClass
- 用于自定义HelpTopicFactory泛型。
必须继承org.bukkit.command.Command或org.bukkit.command.CommandExecutor
原文:The class for which the custom HelpTopicFactory
applies. Must derive from either Command
or CommandExecutor
.
factory
- HelpTopicFactory的实现于commandClass相关联。
原文:The HelpTopicFactory
implementation to associate
with the commandClass
.
java.lang.IllegalArgumentException
- 如果commandClass不是继承一个合法的基类
原文:Thrown if commandClass
does
not derive from a legal base class.
java.util.List<java.lang.String> getIgnoredPlugins()
原文:Gets the list of plugins the server administrator has chosen to exclude
from the help index. Plugin authors who choose to directly extend
Command
instead of PluginCommand
will need to check this collection in
their HelpTopicFactory
implementations to ensure they meet the
server administrator's expectations.