diff --git a/Essentials/src/main/java/com/earth2me/essentials/Essentials.java b/Essentials/src/main/java/com/earth2me/essentials/Essentials.java index b6e57d52e62..662ef541c7b 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/main/java/com/earth2me/essentials/Essentials.java @@ -145,8 +145,17 @@ import org.bukkit.scheduler.BukkitTask; import java.io.File; -import java.io.IOException; -import java.util.*; +import java.io.IOException;import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.Set; +import java.util.UUID; import java.util.function.Predicate; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandhelp.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandhelp.java index 9e13ca8d6cb..2df0eb13f38 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandhelp.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandhelp.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.MissingResourceException; public class Commandhelp extends EssentialsCommand { public Commandhelp() { @@ -41,7 +42,13 @@ protected void run(final Server server, final User user, final String commandLab final boolean isEssCommand = bukkit instanceof PluginIdentifiableCommand && ((PluginIdentifiableCommand) bukkit).getPlugin().equals(ess); final IEssentialsCommand essCommand = isEssCommand ? ess.getCommandMap().get(bukkit.getName()) : null; user.sendTl("commandHelpLine1", cmd); - user.sendTl("commandHelpLine2", essCommand == null ? bukkit.getDescription() : user.playerTl(bukkit.getName() + "CommandDescription")); + String description = bukkit.getDescription(); + if (essCommand != null) { + try { + description = user.playerTl(bukkit.getName() + "CommandDescription"); + } catch (MissingResourceException ignored) {} + } + user.sendTl("commandHelpLine2", description); user.sendTl("commandHelpLine4", bukkit.getAliases().toString()); user.sendTl("commandHelpLine3"); if (essCommand != null && !essCommand.getUsageStrings().isEmpty()) {