Skip to content

Commit

Permalink
Comply with requested changes (x2)
Browse files Browse the repository at this point in the history
  • Loading branch information
iiAhmedYT committed Nov 24, 2024
1 parent 969afa0 commit 8acde99
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
13 changes: 11 additions & 2 deletions Essentials/src/main/java/com/earth2me/essentials/Essentials.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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()) {
Expand Down

0 comments on commit 8acde99

Please sign in to comment.