mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-12-24 17:38:59 +08:00
添加文档提示
This commit is contained in:
parent
33bff49268
commit
18ba8272ef
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.9.0-beta</version>
|
||||
<version>1.9.1-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -12,10 +12,7 @@ import org.bukkit.command.TabExecutor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import static cn.lunadeer.dominion.commands.Helper.*;
|
||||
|
||||
@ -54,7 +51,8 @@ public class Commands implements TabExecutor {
|
||||
@Override
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
if (args.length == 0) {
|
||||
return false;
|
||||
Menu.show(sender, args);
|
||||
return true;
|
||||
}
|
||||
switch (args[0]) {
|
||||
case "menu":
|
||||
|
@ -3,6 +3,9 @@ package cn.lunadeer.dominion.tuis;
|
||||
import cn.lunadeer.dominion.utils.STUI.Button;
|
||||
import cn.lunadeer.dominion.utils.STUI.Line;
|
||||
import cn.lunadeer.dominion.utils.STUI.View;
|
||||
import cn.lunadeer.dominion.utils.STUI.ViewStyles;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.event.ClickEvent;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -18,11 +21,16 @@ public class Menu {
|
||||
Line help = Line.create()
|
||||
.append(Button.create("指令帮助", "/dominion help"))
|
||||
.append("查看指令帮助");
|
||||
Line link = Line.create()
|
||||
.append(Component.text("[使用文档]", ViewStyles.action_color)
|
||||
.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, "https://ssl.lunadeer.cn:14448/doc/23/")))
|
||||
.append("在浏览器中打开使用文档");
|
||||
View view = View.create();
|
||||
view.title("Dominion 领地系统")
|
||||
.navigator(Line.create().append("主菜单"))
|
||||
.addLine(list)
|
||||
.addLine(help)
|
||||
.addLine(link)
|
||||
.showOn(player);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user