From be076509f24d697505153de8dae7d08e89aa70c0 Mon Sep 17 00:00:00 2001 From: Ali 'SupaHam' M Date: Sun, 12 Nov 2017 16:44:53 +0000 Subject: [PATCH] Implement clear confirmation (#1623) Introduces: - `clearinventoryconfirmtoggle` command with shorter aliases - `confirmClear` boolean in UserData --- .../src/com/earth2me/essentials/IUser.java | 4 +++ .../src/com/earth2me/essentials/User.java | 9 +++++ .../src/com/earth2me/essentials/UserData.java | 19 +++++++++- .../commands/Commandclearconfirmtoggle.java | 32 +++++++++++++++++ .../commands/Commandclearinventory.java | 35 ++++++++++++++++--- Essentials/src/messages.properties | 3 ++ Essentials/src/messages_cs.properties | 2 ++ Essentials/src/messages_da.properties | 2 ++ Essentials/src/messages_de.properties | 2 ++ Essentials/src/messages_en.properties | 3 ++ Essentials/src/messages_es.properties | 2 ++ Essentials/src/messages_et.properties | 2 ++ Essentials/src/messages_fi.properties | 2 ++ Essentials/src/messages_fr.properties | 2 ++ Essentials/src/messages_hu.properties | 2 ++ Essentials/src/messages_it.properties | 2 ++ Essentials/src/messages_ko.properties | 2 ++ Essentials/src/messages_lt.properties | 2 ++ Essentials/src/messages_nl.properties | 2 ++ Essentials/src/messages_pl.properties | 2 ++ Essentials/src/messages_pt.properties | 2 ++ Essentials/src/messages_pt_BR.properties | 2 ++ Essentials/src/messages_ro.properties | 2 ++ Essentials/src/messages_ru.properties | 2 ++ Essentials/src/messages_sv.properties | 2 ++ Essentials/src/messages_tr.properties | 2 ++ Essentials/src/messages_zh.properties | 2 ++ Essentials/src/messages_zh_HK.properties | 2 ++ Essentials/src/messages_zh_TW.properties | 2 ++ Essentials/src/plugin.yml | 4 +++ 30 files changed, 147 insertions(+), 6 deletions(-) create mode 100644 Essentials/src/com/earth2me/essentials/commands/Commandclearconfirmtoggle.java diff --git a/Essentials/src/com/earth2me/essentials/IUser.java b/Essentials/src/com/earth2me/essentials/IUser.java index 9e786da79..6a9c98230 100644 --- a/Essentials/src/com/earth2me/essentials/IUser.java +++ b/Essentials/src/com/earth2me/essentials/IUser.java @@ -178,6 +178,10 @@ public interface IUser { boolean isPromptingPayConfirm(); void setPromptingPayConfirm(boolean prompt); + + boolean isPromptingClearConfirm(); + + void setPromptingClearConfirm(boolean prompt); Map getConfirmingPayments(); } diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index e9035a8ef..a3213b595 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -61,6 +61,7 @@ public class User extends UserData implements Comparable, IMessageRecipien private String afkMessage; private long afkSince; private Map confirmingPayments = new WeakHashMap<>(); + private String confirmingClearCommand; private long lastNotifiedAboutMailsMs; public User(final Player base, final IEssentials ess) { @@ -846,6 +847,14 @@ public class User extends UserData implements Comparable, IMessageRecipien return confirmingPayments; } + public String getConfirmingClearCommand() { + return confirmingClearCommand; + } + + public void setConfirmingClearCommand(String command) { + this.confirmingClearCommand = command; + } + /** * Returns the {@link ItemStack} in the main hand or off-hand. If the main hand is empty then the offhand item is returned - also nullable. */ diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 22d1e29b8..7ea09b3e9 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -91,6 +91,7 @@ public abstract class UserData extends PlayerExtension implements IConf { commandCooldowns = _getCommandCooldowns(); acceptingPay = _getAcceptingPay(); confirmPay = _getConfirmPay(); + confirmClear = _getConfirmClear(); } private BigDecimal money; @@ -897,7 +898,7 @@ public abstract class UserData extends PlayerExtension implements IConf { save(); } - private boolean confirmPay = true; // players accept pay by default + private boolean confirmPay = true; // players accept pay confirmation by default public boolean _getConfirmPay() { return config.getBoolean("confirm-pay", true); @@ -913,6 +914,22 @@ public abstract class UserData extends PlayerExtension implements IConf { save(); } + private boolean confirmClear = true; // players accept clear confirmation by default + + public boolean _getConfirmClear() { + return config.getBoolean("confirm-clear", true); + } + + public boolean isPromptingClearConfirm() { + return confirmClear; + } + + public void setPromptingClearConfirm(boolean prompt) { + this.confirmClear = prompt; + config.setProperty("confirm-clear", prompt); + save(); + } + public UUID getConfigUUID() { return config.uuid; } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandclearconfirmtoggle.java b/Essentials/src/com/earth2me/essentials/commands/Commandclearconfirmtoggle.java new file mode 100644 index 000000000..227d88303 --- /dev/null +++ b/Essentials/src/com/earth2me/essentials/commands/Commandclearconfirmtoggle.java @@ -0,0 +1,32 @@ +package com.earth2me.essentials.commands; + +import static com.earth2me.essentials.I18n.tl; + +import com.earth2me.essentials.User; + +import org.bukkit.Server; + +public class Commandclearconfirmtoggle extends EssentialsCommand { + + public Commandclearconfirmtoggle() { + super("clearinventoryconfirmtoggle"); + } + + @Override + public void run(Server server, User user, String commandLabel, String[] args) throws Exception { + boolean confirmingClear = !user.isPromptingClearConfirm(); + if (commandLabel.toLowerCase().endsWith("on")) { + confirmingClear = true; + } else if (commandLabel.toLowerCase().endsWith("off")) { + confirmingClear = false; + } + user.setPromptingClearConfirm(confirmingClear); + if (confirmingClear) { + user.sendMessage(tl("clearInventoryConfirmToggleOn")); + } else { + user.sendMessage(tl("clearInventoryConfirmToggleOff")); + } + user.setConfirmingClearCommand(null); + } +} + diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java index 420c1d57f..6de51fe12 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandclearinventory.java @@ -1,9 +1,13 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n.tl; + import com.earth2me.essentials.CommandSource; import com.earth2me.essentials.User; import com.earth2me.essentials.craftbukkit.InventoryWorkaround; import com.earth2me.essentials.utils.NumberUtil; +import com.earth2me.essentials.utils.StringUtil; + import org.bukkit.Server; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -14,10 +18,9 @@ import java.util.Collections; import java.util.List; import java.util.Locale; -import static com.earth2me.essentials.I18n.tl; - public class Commandclearinventory extends EssentialsCommand { + public Commandclearinventory() { super("clearinventory"); } @@ -27,16 +30,22 @@ public class Commandclearinventory extends EssentialsCommand { @Override public void run(Server server, User user, String commandLabel, String[] args) throws Exception { - parseCommand(server, user.getSource(), args, user.isAuthorized("essentials.clearinventory.others"), user.isAuthorized("essentials.clearinventory.all") || user.isAuthorized("essentials.clearinventory.multiple")); + parseCommand(server, user.getSource(), commandLabel, args, user.isAuthorized("essentials.clearinventory.others"), + user.isAuthorized("essentials.clearinventory.all") || user.isAuthorized("essentials.clearinventory.multiple")); } @Override protected void run(Server server, CommandSource sender, String commandLabel, String[] args) throws Exception { - parseCommand(server, sender, args, true, true); + parseCommand(server, sender, commandLabel, args, true, true); } - private void parseCommand(Server server, CommandSource sender, String[] args, boolean allowOthers, boolean allowAll) throws Exception { + private void parseCommand(Server server, CommandSource sender, String commandLabel, String[] args, boolean allowOthers, boolean allowAll) + throws Exception { Collection players = new ArrayList(); + User senderUser = ess.getUser(sender.getPlayer()); + // Clear previous command execution before potential errors to reset confirmation. + String previousClearCommand = senderUser.getConfirmingClearCommand(); + senderUser.setConfirmingClearCommand(null); int offset = 0; if (sender.isPlayer()) { @@ -55,6 +64,18 @@ public class Commandclearinventory extends EssentialsCommand { if (players.size() < 1) { throw new PlayerNotFoundException(); } + + + // Confirm + String formattedCommand = formatCommand(commandLabel, args); + if (senderUser != null && senderUser.isPromptingClearConfirm()) { + if (!formattedCommand.equals(previousClearCommand)) { + senderUser.setConfirmingClearCommand(formattedCommand); + senderUser.sendMessage(tl("confirmClear", formattedCommand)); + return; + } + } + for (Player player : players) { clearHandler(sender, player, args, offset, players.size() < EXTENDED_CAP); } @@ -175,4 +196,8 @@ public class Commandclearinventory extends EssentialsCommand { return Collections.emptyList(); } } + + private String formatCommand(String commandLabel, String[] args) { + return "/" + commandLabel + " " + StringUtil.joinList(" ", (Object[]) args); + } } diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 7d85fa42c..095943e33 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -54,12 +54,15 @@ chatTypeLocal=[L] chatTypeSpy=[Spy] cleaned=Userfiles Cleaned. cleaning=Cleaning userfiles. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Command {0} failed\: commandHelpFailedForPlugin=Error getting help for plugin\: {0} commandNotLoaded=\u00a74Command {0} is improperly loaded. compassBearing=\u00a76Bearing\: {0} ({1} degrees). configFileMoveError=Failed to move config.yml to backup location. configFileRenameError=Failed to rename temp file to config.yml. +confirmClear=\u00a77To \u00a7lCONFIRM\u00a77 inventory clear, please repeat command: \u00a76{0} confirmPayment=\u00a77To \u00a7lCONFIRM\u00a77 payment of \u00a76{0}\u00a77, please repeat command: \u00a76{1} connectedPlayers=\u00a76Connected players\u00a7r connectionFailed=Failed to open connection. diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index 3d85df026..f6659b9ff 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spy] cleaned=Uzivatelske zaznamy vycisteny. cleaning=Cistim uzivatelske zaznamy. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Prikaz {0} selhal. commandHelpFailedForPlugin=Chyba pri ziskavani pomoci\: {0} commandNotLoaded=\u00a7cPrikaz {0} je nespravne nacteny. diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index f6f4cf5c1..ea921355c 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spion] cleaned=Brugerfiler blev renset. cleaning=Renser brugerfiler. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Kommando {0} fejlede\: commandHelpFailedForPlugin=Fejl ved hentning af hj\u00e6lp til pluginnet\: {0} commandNotLoaded=\u00a74Kommandoen {0} er indl\u00e6st forkert. diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index a0c552833..ba9ab3fba 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -55,6 +55,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spion] cleaned=Spielerdateien geleert. cleaning=S\u00e4ubere Spielerdateien. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Befehl {0} scheiterte\: commandHelpFailedForPlugin=Fehler beim Abrufen der Hilfe f\u00fcr\: {0} commandNotLoaded=\u00a74Befehl {0} ist nicht richtig geladen. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index a3f9e8970..84a35c84f 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -54,12 +54,15 @@ chatTypeLocal=[L] chatTypeSpy=[Spy] cleaned=Userfiles Cleaned. cleaning=Cleaning userfiles. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Command {0} failed\: commandHelpFailedForPlugin=Error getting help for plugin\: {0} commandNotLoaded=\u00a74Command {0} is improperly loaded. compassBearing=\u00a76Bearing\: {0} ({1} degrees). configFileMoveError=Failed to move config.yml to backup location. configFileRenameError=Failed to rename temp file to config.yml. +confirmClear=\u00a77To \u00a7lCONFIRM\u00a77 inventory clear, please repeat command: \u00a76{0} confirmPayment=\u00a77To \u00a7lCONFIRM\u00a77 payment of \u00a76{0}\u00a77, please repeat command: \u00a76{1} connectedPlayers=\u00a76Connected players\u00a7r connectionFailed=Failed to open connection. diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 942576b45..3ede2bccb 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Esp\u00eda] cleaned=Archivos de usuarios limpiados. cleaning=Limpiando archivos de usuario. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Comando {0} fallido\: commandHelpFailedForPlugin=Error al obtener ayuda para el plugin\: {0} commandNotLoaded=\u00a74El comando {0} no est\u00e1 cargado correctamente. diff --git a/Essentials/src/messages_et.properties b/Essentials/src/messages_et.properties index f608e9f16..ef0759d16 100644 --- a/Essentials/src/messages_et.properties +++ b/Essentials/src/messages_et.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spioon] cleaned=Kasutajafailid puhastatud. cleaning=Kasutajafailide puhastus. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=K\u00e4sk {0} eba\u00f5nnestus\: commandHelpFailedForPlugin=Viga saades abi pluginale\: {0} commandNotLoaded=\u00a74K\u00e4sk {0} on ebakoheselt laetud. diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index b3711d96f..48eb8742e 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Vakoilla] cleaned=K\u00e4ytt\u00e4j\u00e4tiedot on poistettu. cleaning=Poistetaan k\u00e4ytt\u00e4j\u00e4tietoja. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Komento {0} ep\u00e4onnistui\: commandHelpFailedForPlugin=Virhe haettaessa apua komennoista\: {0} commandNotLoaded=\u00a7cKomento {0} on v\u00e4\u00e4rin ladattu. diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 18bf07c6d..56ddc3450 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -55,6 +55,8 @@ chatTypeLocal=[L] chatTypeSpy=[Espion] cleaned=Fichiers joueurs nettoy\u00e9s. cleaning=Nettoyage des fichiers joueurs... +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=\u00c9chec de la commande {0} \: commandHelpFailedForPlugin=Erreur d''obtention d''aide pour \: {0} commandNotLoaded=\u00a7cLa commande {0} a \u00e9t\u00e9 mal charg\u00e9e. diff --git a/Essentials/src/messages_hu.properties b/Essentials/src/messages_hu.properties index d897b2272..9406cfc2a 100644 --- a/Essentials/src/messages_hu.properties +++ b/Essentials/src/messages_hu.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=\u00a72[K\u00e9m]\u00a7r cleaned=J\u00e1t\u00e9kos f\u00e1jlok t\u00f6r\u00f6lve. cleaning=J\u00e1t\u00e9kos f\u00e1jlok tiszt\u00edt\u00e1sa. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Parancs {0} sikertelen\: commandHelpFailedForPlugin=Hiba a seg\u00edts\u00e9g lek\u00e9r\u00e9sben a(z) {0} pluginban commandNotLoaded=\u00a74Parancs {0} nincs bet\u00f6ltve. diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index 733823fb4..246c5ffc7 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spia] cleaned=File utente puliti. cleaning=Pulizia dei file utente in corso. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Comando {0} fallito\: commandHelpFailedForPlugin=Errore ottenendo la guida del plugin\: {0} commandNotLoaded=\u00a74Il comando {0} non \u00E8 stato caricato correttamente. diff --git a/Essentials/src/messages_ko.properties b/Essentials/src/messages_ko.properties index e78c94971..e6a814588 100644 --- a/Essentials/src/messages_ko.properties +++ b/Essentials/src/messages_ko.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[\uc2a4\ud30c\uc774] cleaned=\uc720\uc800 \ud30c\uc77c\uc774 \uc815\ub9ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4. cleaning=\uc720\uc800 \ud30c\uc77c\uc744 \uc815\ub9ac\ud569\ub2c8\ub2e4. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=\uba85\ub839\uc5b4 {0} \uc0ac\uc6a9 \uc2e4\ud328\: commandHelpFailedForPlugin={0} \ud50c\ub7ec\uadf8\uc778\uc758 \ub3c4\uc6c0\ub9d0\uc744 \ubd88\ub7ec\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. commandNotLoaded=\u00a7c \uba85\ub839\uc5b4 {0}\ub97c \uc798\ubabb \ubd88\ub7ec\uc654\uc2b5\ub2c8\ub2e4. diff --git a/Essentials/src/messages_lt.properties b/Essentials/src/messages_lt.properties index 2cf06269a..3f896505d 100644 --- a/Essentials/src/messages_lt.properties +++ b/Essentials/src/messages_lt.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spy] cleaned=Userfiles Cleaned. cleaning=Cleaning userfiles. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Komanda {0} nepavyko\: commandHelpFailedForPlugin=Error getting help for plugin\: {0} commandNotLoaded=\u00a74Command {0} is improperly loaded. diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index cc19b0b4c..bf7107397 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spion] cleaned=Gebruikersbestanden opgeschoont. cleaning=Opschonen van gebruikersbestanden. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Opdracht {0} is mislukt\: commandHelpFailedForPlugin=Fout bij het verkrijgen van hulp voor\: {0}. commandNotLoaded=\u00a7cOpdracht {0} is fout geladen. diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index 5675d206b..2a4c033fa 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Szpieg] cleaned=Pliki gracza wyczyszczono. cleaning=Czyszczene plik\u00F3w gracza. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Komenda {0} zawiod\u0142a. commandHelpFailedForPlugin=B\u0142\u0105d podczas uzyskiwania pomocy dla\: {0} commandNotLoaded=\u00a74Komenda {0} nie jest za\u0142adowana\! diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index f9f1c7ef9..35f57f228 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Espi\u00E3o] cleaned=Os arquivos do usu\u00E1rio foram apagados. cleaning=A apagar arquivos do usu\u00E1rio. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Comando {0} falhou: commandHelpFailedForPlugin=Erro ao adquirir ajuda do plugin: {0} commandNotLoaded=\u00A74Comando {0} est\u00E1 carregado incorretamente. diff --git a/Essentials/src/messages_pt_BR.properties b/Essentials/src/messages_pt_BR.properties index f524ee178..ae18bde31 100644 --- a/Essentials/src/messages_pt_BR.properties +++ b/Essentials/src/messages_pt_BR.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Espi\u00E3o] cleaned=Os arquivos do usu\u00E1rio foram apagados. cleaning=Apagando arquivos do usu\u00E1rio. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Comando {0} falhou\: commandHelpFailedForPlugin=Erro ao adquirir ajuda do plugin\: {0} commandNotLoaded=\u00A74Comando {0} est\u00E1 carregado incorretamente. diff --git a/Essentials/src/messages_ro.properties b/Essentials/src/messages_ro.properties index ad46b347e..635782803 100644 --- a/Essentials/src/messages_ro.properties +++ b/Essentials/src/messages_ro.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spion] cleaned=Fisierele jucatorilor au fost curatate. cleaning=Fisierele jucatorilor se curata. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Comanda {0} a esuat\: commandHelpFailedForPlugin=Eroare primire ajutor pentru pluginul\: {0} commandNotLoaded=\u00a74Comanda {0} este partial incarcata. diff --git a/Essentials/src/messages_ru.properties b/Essentials/src/messages_ru.properties index 1a8bd5d04..3f21d9edd 100644 --- a/Essentials/src/messages_ru.properties +++ b/Essentials/src/messages_ru.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spy] cleaned=\u0424\u0430\u0439\u043b\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0447\u0438\u0449\u0435\u043d\u044b. cleaning=\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0438\u0433\u0440\u043e\u043a\u0430. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=\u041a\u043e\u043c\u0430\u043d\u0434\u0430 {0} \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f\: commandHelpFailedForPlugin=\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430\: {0} commandNotLoaded=\u00a74\u041a\u043e\u043c\u0430\u043d\u0434\u0430 {0} \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430. diff --git a/Essentials/src/messages_sv.properties b/Essentials/src/messages_sv.properties index 9876fd323..a1bfd7491 100644 --- a/Essentials/src/messages_sv.properties +++ b/Essentials/src/messages_sv.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Spion] cleaned=Anv\u00e4ndarfiler rensade. cleaning=Rensar anv\u00e4ndarfiler. +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Kommando {0} misslyckades\: commandHelpFailedForPlugin=Kunde inte hitta hj\u00e4lp f\u00f6r\: {0} commandNotLoaded=\u00a7cKommando {0} \u00e4r felaktigt laddat. diff --git a/Essentials/src/messages_tr.properties b/Essentials/src/messages_tr.properties index e4fc033d2..e9f323191 100644 --- a/Essentials/src/messages_tr.properties +++ b/Essentials/src/messages_tr.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[Casus] cleaned=Oyuncu Verileri Temizlendi. cleaning=Oyuncu Verileri Temizleniyor... +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=Komut {0} Gecersiz\: commandHelpFailedForPlugin=Hata\:Bu Plugin Hakkinda Yardim Almak Icin\: {0} commandNotLoaded=\u00a74Komut Yuklenemedi\! diff --git a/Essentials/src/messages_zh.properties b/Essentials/src/messages_zh.properties index 33c30875f..341ade4f4 100644 --- a/Essentials/src/messages_zh.properties +++ b/Essentials/src/messages_zh.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[\u76d1\u89c6] cleaned=\u7528\u6237\u6587\u4ef6\u5df2\u6e05\u7a7a cleaning=\u6e05\u7a7a\u7528\u6237\u6587\u4ef6... +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=\u547d\u4ee4 {0} \u5931\u8d25\: commandHelpFailedForPlugin=\u672a\u80fd\u83b7\u53d6\u6b64\u63d2\u4ef6\u7684\u5e2e\u52a9\:{0} commandNotLoaded=\u00a74 \u547d\u4ee4{0}\u52a0\u8f7d\u5931\u8d25 diff --git a/Essentials/src/messages_zh_HK.properties b/Essentials/src/messages_zh_HK.properties index 7989e6723..99e9d41ee 100644 --- a/Essentials/src/messages_zh_HK.properties +++ b/Essentials/src/messages_zh_HK.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[\u76e3\u807d] cleaned=\u7528\u6236\u6587\u4ef6\u5df2\u6e05\u7a7a cleaning=\u6e05\u7a7a\u7528\u6236\u6587\u4ef6... +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=\u547d\u4ee4 {0} \u5931\u6557\: commandHelpFailedForPlugin=\u672a\u80fd\u7372\u53d6\u6b64\u5916\u639b\u7a0b\u5f0f\u7684\u5e6b\u52a9\:{0} commandNotLoaded=\u00a74 {0} \u547d\u4ee4\u52a0\u8f09\u5931\u6557 diff --git a/Essentials/src/messages_zh_TW.properties b/Essentials/src/messages_zh_TW.properties index b54ab4afd..d5588b1f9 100644 --- a/Essentials/src/messages_zh_TW.properties +++ b/Essentials/src/messages_zh_TW.properties @@ -54,6 +54,8 @@ chatTypeLocal=[L] chatTypeSpy=[\u76e3\u807d] cleaned=\u73a9\u5bb6\u8cc7\u6599\u5df2\u6e05\u9664 cleaning=\u6e05\u9664\u73a9\u5bb6\u8cc7\u6599... +clearInventoryConfirmToggleOn=\u00a76You will now be prompted to confirm inventory clears. +clearInventoryConfirmToggleOff=\u00a76You will no longer be prompted to confirm inventory clears. commandFailed=\u6307\u4ee4 {0} \u5931\u6557\: commandHelpFailedForPlugin=\u7121\u6cd5\u53d6\u5f97\u6b64\u63d2\u4ef6\u7684\u8aaa\u660e\:{0} commandNotLoaded=\u00a74 {0} \u6307\u4ee4\u8f09\u5165\u5931\u6557 diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index f8ff46b89..03c1374a7 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -68,6 +68,10 @@ commands: description: Clear all items in your inventory. usage: / [player|*] [item[:]|*|**] [amount] aliases: [ci,eci,clean,eclean,clear,eclear,clearinvent,eclearinvent,eclearinventory] + clearinventoryconfirmtoggle: + description: Toggles whether you are prompted to confirm inventory clears. + usage: / + aliases: [eclearinventoryconfirmtoggle, clearinventoryconfirmoff, eclearinventoryconfirmoff, clearconfirmoff, eclearconfirmoff, clearconfirmon, eclearconfirmon, clearconfirm, eclearconfirm] condense: description: Condenses items into a more compact blocks. usage: / [||hand|inventory]