From 374115c68b74e8c2bdc54e3beb0144b104802606 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 23 Aug 2022 10:40:16 +0100 Subject: [PATCH] Fix unclickable home privacy toggle button --- .../net/william278/huskhomes/command/EditHomeCommand.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/net/william278/huskhomes/command/EditHomeCommand.java b/common/src/main/java/net/william278/huskhomes/command/EditHomeCommand.java index 13a6f888..17792ef9 100644 --- a/common/src/main/java/net/william278/huskhomes/command/EditHomeCommand.java +++ b/common/src/main/java/net/william278/huskhomes/command/EditHomeCommand.java @@ -326,9 +326,11 @@ public class EditHomeCommand extends CommandBase implements TabCompletable, Cons formattedName) .ifPresent(this::add); } - plugin.getLocales().getRawLocale("edit_home_menu_manage_buttons", - Locales.escapeMineDown(formattedName), showPrivacyToggleButton ? plugin.getLocales() - .getRawLocale("edit_home_menu_toggle_privacy_button").orElse("") : "") + final String escapedName = Locales.escapeMineDown(formattedName); + plugin.getLocales().getRawLocale("edit_home_menu_manage_buttons", escapedName, + showPrivacyToggleButton ? plugin.getLocales() + .getRawLocale("edit_home_menu_toggle_privacy_button", escapedName) + .orElse("") : "") .map(MineDown::new).ifPresent(this::add); plugin.getLocales().getLocale("edit_home_menu_meta_edit_buttons", formattedName)