Implement clear confirmation (#1623)

Introduces:
- `clearinventoryconfirmtoggle` command with shorter aliases
- `confirmClear` boolean in UserData
This commit is contained in:
Ali 'SupaHam' M 2017-11-12 16:44:53 +00:00 committed by GitHub
parent 73457453bb
commit be076509f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 147 additions and 6 deletions

View File

@ -178,6 +178,10 @@ public interface IUser {
boolean isPromptingPayConfirm();
void setPromptingPayConfirm(boolean prompt);
boolean isPromptingClearConfirm();
void setPromptingClearConfirm(boolean prompt);
Map<User, BigDecimal> getConfirmingPayments();
}

View File

@ -61,6 +61,7 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
private String afkMessage;
private long afkSince;
private Map<User, BigDecimal> 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<User>, 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.
*/

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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<Player> players = new ArrayList<Player>();
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);
}
}

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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\!

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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\!

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -68,6 +68,10 @@ commands:
description: Clear all items in your inventory.
usage: /<command> [player|*] [item[:<data>]|*|**] [amount]
aliases: [ci,eci,clean,eclean,clear,eclear,clearinvent,eclearinvent,eclearinventory]
clearinventoryconfirmtoggle:
description: Toggles whether you are prompted to confirm inventory clears.
usage: /<command>
aliases: [eclearinventoryconfirmtoggle, clearinventoryconfirmoff, eclearinventoryconfirmoff, clearconfirmoff, eclearconfirmoff, clearconfirmon, eclearconfirmon, clearconfirm, eclearconfirm]
condense:
description: Condenses items into a more compact blocks.
usage: /<command> [<itemname>|<id>|hand|inventory]