From 21214814b73b4168f8932a770b7c62ff70d93dbf Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 31 May 2021 21:59:15 +0200 Subject: [PATCH] Fixes #3032 --- .../com/plotsquared/core/command/Command.java | 24 ++++--------------- Core/src/main/resources/lang/messages_en.json | 2 +- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Command.java b/Core/src/main/java/com/plotsquared/core/command/Command.java index e1c283f7a..d1d3b3505 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Command.java +++ b/Core/src/main/java/com/plotsquared/core/command/Command.java @@ -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); - } + 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); } /** diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index fbb6c45d3..467df158d 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -383,7 +383,7 @@ "list.area_list_header_paged": "(Page /) List of areas", "list.plot_list_header_paged": "(Page /) List of plots", "list.plot_list_header": "List of plots.", - "list.page_turn": "><- | >->", + "list.page_turn": ">Back | >Next", "chat.plot_chat_spy_format": "[Plot Spy] [] : ", "chat.plot_chat_format": "[Plot Chat] [] : ", "chat.plot_chat_forced": "This world forces everyone to use plot chat.",