-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CommandHelp #38
Closed
Closed
CommandHelp #38
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9c0b088
zh-cn.yml
ColdeZhang 0329f94
Merge remote-tracking branch 'origin/master'
Apleax 9391bf5
/dominion help
Apleax 165fd33
i18n
Apleax 0398e74
TUI_Menu_CommandHelpButton指向/dominion help
Apleax ad3fdaf
添加注释
Apleax 7957abf
添加注释
Apleax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
import cn.lunadeer.dominion.managers.Translation; | ||
import cn.lunadeer.minecraftpluginutils.Notification; | ||
import cn.lunadeer.minecraftpluginutils.stui.ListView; | ||
import cn.lunadeer.minecraftpluginutils.stui.components.Button; | ||
import cn.lunadeer.minecraftpluginutils.stui.components.Line; | ||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.entity.Player; | ||
|
@@ -66,11 +67,39 @@ public static void printHelp(CommandSender sender, String[] args) { | |
Player player = playerOnly(sender); | ||
if (player == null) return; | ||
int page = getPage(args, 1); | ||
|
||
//TODO 帮助菜单的子菜单 | ||
Line dominionManage = Line.create() | ||
.append(Button.create(Translation.TUI_CommandHelp_DominionManageButton).setExecuteCommand("").build()) | ||
.append(Translation.TUI_CommandHelp_DominionManageDescription); | ||
|
||
Line memberManage = Line.create() | ||
.append(Button.create(Translation.TUI_CommandHelp_MemberManageButton).setExecuteCommand("").build()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 帮助菜单的按钮没有关联实际功能? 我看 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 还没有,一直没写,现在刚准备开始 |
||
.append(Translation.TUI_CommandHelp_MemberManageDescription); | ||
|
||
Line groupManage = Line.create() | ||
.append(Button.create(Translation.TUI_CommandHelp_GroupManageButton).setExecuteCommand("").build()) | ||
.append(Translation.TUI_CommandHelp_GroupManageDescription); | ||
|
||
Line misc = Line.create() | ||
.append(Button.create(Translation.TUI_CommandHelp_MiscButton).setExecuteCommand("").build()) | ||
.append(Translation.TUI_CommandHelp_MiscDescription); | ||
|
||
Line opCommand = Line.create() | ||
.append(Button.create(Translation.TUI_CommandHelp_OpCommandButton).setExecuteCommand("").build()) | ||
.append(Translation.TUI_CommandHelp_OpCommandDescription); | ||
|
||
ListView view = ListView.create(10, "/dominion help"); | ||
view.title(Translation.TUI_CommandHelp_Title.trans()) | ||
.subtitle(Line.create().append(Translation.TUI_CommandHelp_SubTitle.trans())) | ||
// todo ... | ||
.showOn(player, page); | ||
view.title(Translation.TUI_CommandHelp_Title); | ||
view.navigator(Line.create() | ||
.append(Button.create(Translation.TUI_Navigation_Menu).setExecuteCommand("/dominion menu").build()) | ||
.append(Translation.TUI_Navigation_CommandHelpList)); | ||
view.add(dominionManage); | ||
view.add(memberManage); | ||
view.add(groupManage); | ||
view.add(misc); | ||
view.add(opCommand); | ||
view.showOn(player, page); | ||
} | ||
|
||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
尽可能避免在提交合并的代码中包含类似过多的冗余注释 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK