From 9c59bfde5268df52578e757004e68c234cba02cd Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Wed, 19 May 2021 23:48:32 +0200 Subject: [PATCH] Rephrase message if user has no access to sub-command help pages --- .../main/java/com/plotsquared/core/util/helpmenu/HelpPage.java | 2 +- Core/src/main/resources/lang/messages_en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpPage.java b/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpPage.java index 309e29ab8..a5f23fccf 100644 --- a/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpPage.java +++ b/Core/src/main/java/com/plotsquared/core/util/helpmenu/HelpPage.java @@ -53,7 +53,7 @@ public class HelpPage { public void render(PlotPlayer player) { if (this.helpObjects.size() < 1) { - player.sendMessage(TranslatableCaption.of("invalid.not_valid_number"), Template.of("value", "(0)")); + player.sendMessage(TranslatableCaption.of("help.no_permission")); } else { Template header = Template.of("header", TranslatableCaption.of("help.help_header").getComponent(player)); Template page_header = Template.of( diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index a1aabf5e8..a078b11fa 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -404,6 +404,7 @@ "help.help_item": " []\n - \n", "help.help_display_all_commands": "Display all commands.", "help.direction": "Current direction: ", + "help.no_permission": "You have no permission to access commands of that sub category, hence you cannot access the help page.", "category.command_category_claiming": "Claiming", "category.command_category_teleport": "Teleport", "category.command_category_settings": "Protection",