This commit is contained in:
NotMyFault 2021-05-31 21:59:15 +02:00
parent 3ac93dcfca
commit 21214814b7
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 5 additions and 21 deletions

View File

@ -277,26 +277,10 @@ public abstract class Command {
player.sendMessage(msg.get(), msg.getTemplates());
}
// Send the footer
if (page < totalPages && page > 0) { // Back | Next
Template command1 = Template.of("command1", baseCommand + " " + page);
Template command2 = Template.of("command2", baseCommand + " " + (page + 2));
Template clickable = Template.of("clickable", TranslatableCaption.of("list.clickable").getComponent(player));
player.sendMessage(TranslatableCaption.of("list.page_turn"), command1, command2, clickable);
return;
}
if (page == 0 && totalPages != 0) { // Next
Template command1 = Template.of("command1", "");
Template command2 = Template.of("command2", baseCommand + " " + (page + 2));
Template clickable = Template.of("clickable", TranslatableCaption.of("list.clickable").getComponent(player));
player.sendMessage(TranslatableCaption.of("list.page_turn"), command1, command2, clickable);
return;
}
if (totalPages != 0) { // Back
Template command1 = Template.of("command1", "");
Template command2 = Template.of("command2", "");
Template clickable = Template.of("clickable", TranslatableCaption.of("list.clickable").getComponent(player));
player.sendMessage(TranslatableCaption.of("list.page_turn"), command1, command2, clickable);
}
}
/**

View File

@ -383,7 +383,7 @@
"list.area_list_header_paged": "<gray>(Page </gray><gold><cur></gold><gray>/</gray><gold><max></gold><gray>) </gray><gold>List of <amount> areas</gold>",
"list.plot_list_header_paged": "<gray>(Page </gray><gold><cur></gold><gray>/</gray><gold><max></gold><gray>) </gray><gold>List of <amount> plots</gold>",
"list.plot_list_header": "<prefix><gold>List of <word> plots.</gold>",
"list.page_turn": "<gold><click:run_command:<command1>><-</click></gold><dark_gray> | </dark_gray><gold><click:run_command:<command2>>-></click></gold><gray><clickable></gray>",
"list.page_turn": "<gold><click:run_command:<command1>>Back</gold><dark_gray> | </dark_gray><gold><click:run_command:<command2>>Next</click></gold><gray><clickable></gray>",
"chat.plot_chat_spy_format": "<gray>[<gold>Plot Spy</gold>] [<gold><plot_id></gold>] <gold><sender></gold>: <gold><msg></gold></gray>",
"chat.plot_chat_format": "<gray>[<gold>Plot Chat</gold>] [<gold><plot_id></gold>] <gold><sender></gold>: <gold><msg></gold></gray>",
"chat.plot_chat_forced": "<prefix><gray>This world forces everyone to use plot chat.</gray>",