mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
[Bleeding] Added automatically generated plugin-level sub-indexes to the master help index. Addresses BUKKIT-1180
By: rmichela <deltahat@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import org.bukkit.plugin.Plugin;
|
|||||||
/**
|
/**
|
||||||
* Represents a {@link Command} belonging to a plugin
|
* Represents a {@link Command} belonging to a plugin
|
||||||
*/
|
*/
|
||||||
public final class PluginCommand extends Command {
|
public final class PluginCommand extends Command implements PluginIdentifiableCommand {
|
||||||
private final Plugin owningPlugin;
|
private final Plugin owningPlugin;
|
||||||
private CommandExecutor executor;
|
private CommandExecutor executor;
|
||||||
|
|
||||||
|
@@ -0,0 +1,18 @@
|
|||||||
|
package org.bukkit.command;
|
||||||
|
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This interface is used by the help system to group commands into sub-indexes based
|
||||||
|
* on the {@link Plugin} they are a part of. Custom command implementations will need to
|
||||||
|
* implement this interface to have a sub-index automatically generated on the plugin's
|
||||||
|
* behalf.
|
||||||
|
*/
|
||||||
|
public interface PluginIdentifiableCommand {
|
||||||
|
/**
|
||||||
|
* Gets the owner of this PluginIdentifiableCommand.
|
||||||
|
*
|
||||||
|
* @return Plugin that owns this PluginIdentifiableCommand.
|
||||||
|
*/
|
||||||
|
public Plugin getPlugin();
|
||||||
|
}
|
@@ -1,5 +1,6 @@
|
|||||||
package org.bukkit.help;
|
package org.bukkit.help;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,6 +21,13 @@ public interface HelpMap {
|
|||||||
*/
|
*/
|
||||||
public HelpTopic getHelpTopic(String topicName);
|
public HelpTopic getHelpTopic(String topicName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a collection of all the registered help topics.
|
||||||
|
*
|
||||||
|
* @return All the registered help topics.
|
||||||
|
*/
|
||||||
|
public Collection<HelpTopic> getHelpTopics();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a topic to the server's help index.
|
* Adds a topic to the server's help index.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user