From 63a8f7b7d87c9e41f190f492d1f646876dde61ca Mon Sep 17 00:00:00 2001 From: WiIIiam278 Date: Sun, 6 Jun 2021 01:59:37 +0100 Subject: [PATCH] Move all home deletion to fully format using MineDown, fix #42 --- .../me/william278/huskhomes2/teleport/SettingHandler.java | 8 +------- src/main/resources/Languages/en-gb.yml | 7 ++----- src/main/resources/Languages/it-it.yml | 7 ++----- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/main/java/me/william278/huskhomes2/teleport/SettingHandler.java b/src/main/java/me/william278/huskhomes2/teleport/SettingHandler.java index 6c76124a..ee3a9ed3 100644 --- a/src/main/java/me/william278/huskhomes2/teleport/SettingHandler.java +++ b/src/main/java/me/william278/huskhomes2/teleport/SettingHandler.java @@ -151,13 +151,7 @@ public class SettingHandler { private static void sendDeletionConfirmationWarning(Player player, String deletionType) { // Send the delete-all confirmation warning MessageManager.sendMessage(player, "delete_all_" + deletionType + "s_confirm"); - MessageManager.sendMessage(player, "delete_all_irreversible_warning"); - - // Send Confirm button - player.spigot().sendMessage(new ComponentBuilder() - .append(new MineDown(MessageManager.getRawMessage("option_selection_prompt")).toComponent(), ComponentBuilder.FormatRetention.NONE) - .append(deletionConfirmationButton("del" + deletionType), ComponentBuilder.FormatRetention.NONE).create()); - } +} // Delete all of a player's homes public static void deleteAllHomes(Player player) { diff --git a/src/main/resources/Languages/en-gb.yml b/src/main/resources/Languages/en-gb.yml index 802b4284..2236f308 100644 --- a/src/main/resources/Languages/en-gb.yml +++ b/src/main/resources/Languages/en-gb.yml @@ -108,11 +108,8 @@ edit_home_make_private_button: '[Make Private]' edit_home_make_private_button_tooltip: 'Make your home private' home_default_description: '%1%''s home' warp_default_description: 'A publicly accessible warp' -delete_all_homes_confirm: '[Warning:](#ff3300) [Are you sure you want to delete all of your homes?](#ff7e5e)' -delete_all_warps_confirm: '[Warning:](#ff3300) [Are you sure you want to delete every warp?](#ff7e5e)' -delete_all_irreversible_warning: '[Once you confirm, it will not be possible to recover them.](gray)' -delete_confirmation_button_tooltip: 'Click to confirm deletion. This cannot be undone.' -delete_confirmation_button: '&#ff3300&[Confirm]' +delete_all_homes_confirm: '[Warning:](#ff3300) [Are you sure you want to delete all of your homes?](#ff7e5e)\n[Once you confirm, it will not be possible to recover them.](gray)\n[→](gray) [[Confirm]](#ff3300 show_text=&#ff3300&Click to confirm deletion. This cannot be undone. run_command=/delhome all confirm)' +delete_all_warps_confirm: '[Warning:](#ff3300) [Are you sure you want to delete every warp?](#ff7e5e)\n[Once you confirm, it will not be possible to recover them.](gray)\n[→](gray) [[Confirm]](#ff3300 show_text=&#ff3300&Click to confirm deletion. This cannot be undone. run_command=/delwarp all confirm)' delete_all_homes_success: '[Successfully deleted your](#00fb9a) [%1%](#00fb9a bold) [home(s).](#00fb9a)' delete_all_warps_success: '[Successfully deleted all](#00fb9a) [%1%](#00fb9a bold) [server warp(s).](#00fb9a)' error_permission_restricted_warp: '[Error:](#ff3300) [You do not have permission to warp to %1%!](#ff7e5e)' diff --git a/src/main/resources/Languages/it-it.yml b/src/main/resources/Languages/it-it.yml index 98dc9911..2f464b0b 100644 --- a/src/main/resources/Languages/it-it.yml +++ b/src/main/resources/Languages/it-it.yml @@ -108,11 +108,8 @@ edit_home_make_private_button: '[Rendi Privata]' edit_home_make_private_button_tooltip: 'Rendi la tua home privata' home_default_description: 'Home di %1%' warp_default_description: 'Warp accessibile a tutti!' -delete_all_homes_confirm: '[Attenzione:](#ff3300) [Sei sicuro di voler eliminare tutte le home?](#ff7e5e)' -delete_all_warps_confirm: '[Attenzione:](#ff3300) [Sei sicuro di voler eliminare tutti i warp?](#ff7e5e)' -delete_all_irreversible_warning: '[Una volta confermato non sarà possibile recuperarli.](gray)' -delete_confirmation_button_tooltip: 'Clicca per confermare. AZIONE IRREVERSIBILE.' -delete_confirmation_button: '&#ff3300&[Conferma]' +delete_all_homes_confirm: '[Attenzione:](#ff3300) [Sei sicuro di voler eliminare tutte le home?](#ff7e5e\n[Una volta confermato non sarà possibile recuperarli.](gray)\n[→](gray) [[Conferma]](#ff3300 show_text=&#ff3300&Clicca per confermare. AZIONE IRREVERSIBILE. run_command=/delhome all confirm)' +delete_all_warps_confirm: '[Attenzione:](#ff3300) [Sei sicuro di voler eliminare tutti i warp?](#ff7e5e)\n[Una volta confermato non sarà possibile recuperarli.](gray)\n[→](gray) [[Conferma]](#ff3300 show_text=&#ff3300&Clicca per confermare. AZIONE IRREVERSIBILE. run_command=/delwarp all confirm)' delete_all_homes_success: '[Eliminata con successo la](#00fb9a) [%1%](#00fb9a bold) [home.](#00fb9a)' delete_all_warps_success: '[Eliminati con successo tutti i](#00fb9a) [%1%](#00fb9a bold) [warp.](#00fb9a)' error_permission_restricted_warp: '[Errore:](#ff3300) [Non hai i permessi per usare il warp %1%!](#ff7e5e)'