类 Registration
java.lang.Object
cn.afternode.commons.bukkit.Registration
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明org.bukkit.plugin.PluginvoidregisterCommands(String packageName) Find classes with provided package name and register as Command, target class must extends org.bukkit.command.Command
This method will register commands through CommandMapvoidregisterListeners(String packageName) Find classes with provided package name and register as event listenervoidregisterPluginCommands(String packageName) Find classes with provided package name and register as CommandExecutor/TabExecutor
-
构造器详细资料
-
Registration
public Registration(org.bukkit.plugin.Plugin plg) - 参数:
plg- Plugin instance will be used in registrations
-
-
方法详细资料
-
registerPluginCommands
Find classes with provided package name and register as CommandExecutor/TabExecutor- 参数:
packageName- Target package name- 抛出:
RuntimeException- Not a valid CommandExecutor/TabExecutor; Unable to create instance- 另请参阅:
-
registerCommands
Find classes with provided package name and register as Command, target class must extends org.bukkit.command.Command
This method will register commands through CommandMap- 参数:
packageName-- 抛出:
cn.afternode.commons.ReflectionError- Error in reflections- 另请参阅:
-
CommandMapCommandRegisterCommand
-
registerListeners
Find classes with provided package name and register as event listener- 参数:
packageName- Target package name- 另请参阅:
-
getPlugin
public org.bukkit.plugin.Plugin getPlugin()
-