docs(bukkit): 添加部分文档
This commit is contained in:
@@ -23,6 +23,9 @@ public abstract class ParentCommand extends ChildCommand {
|
|||||||
childCommands = new ArrayList<>();
|
childCommands = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public abstract JavaPlugin getPlugin();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull String getName() {
|
public @NotNull String getName() {
|
||||||
return name;
|
return name;
|
||||||
@@ -33,15 +36,13 @@ public abstract class ParentCommand extends ChildCommand {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public abstract JavaPlugin getPlugin();
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<ChildCommand> getChildCommands() {
|
public List<ChildCommand> getChildCommands() {
|
||||||
return childCommands;
|
return childCommands;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Override
|
||||||
public String getUsage() {
|
public String getUsage() {
|
||||||
if (getParent() == null) {
|
if (getParent() == null) {
|
||||||
return "/" + name;
|
return "/" + name;
|
||||||
@@ -59,6 +60,13 @@ public abstract class ParentCommand extends ChildCommand {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有子命令
|
||||||
|
* <p>
|
||||||
|
* 如果子命令也是 ParentCommand 类型,则继续递归获取该 ParentCommand 的子命令
|
||||||
|
*
|
||||||
|
* @return 所有子命令
|
||||||
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public List<ChildCommand> getEndChildCommands() {
|
public List<ChildCommand> getEndChildCommands() {
|
||||||
ArrayList<ChildCommand> list = new ArrayList<>();
|
ArrayList<ChildCommand> list = new ArrayList<>();
|
||||||
|
Reference in New Issue
Block a user