summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-06-25 16:46:02 +0200
committersnowleo <schneeleo@gmail.com>2011-06-25 16:46:02 +0200
commitca29f18850b50c3019fc03e682ab0d1f235a37a7 (patch)
tree1bee77cf6f65b05e84b10011aa33d2da635a6163
parent503b4fee55c7f0d070f7812e8ac3085ed1796b04 (diff)
downloadEssentials-ca29f18850b50c3019fc03e682ab0d1f235a37a7.tar
Essentials-ca29f18850b50c3019fc03e682ab0d1f235a37a7.tar.gz
Essentials-ca29f18850b50c3019fc03e682ab0d1f235a37a7.tar.lz
Essentials-ca29f18850b50c3019fc03e682ab0d1f235a37a7.tar.xz
Essentials-ca29f18850b50c3019fc03e682ab0d1f235a37a7.zip
Cleanup of KHobbits commit
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhelp.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
index 4361fe1cf..3a93e82b1 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
@@ -31,18 +31,18 @@ public class Commandhelp extends EssentialsCommand
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
int page = 1;
- String match = args[0].toLowerCase();
+ String match = args[0].toLowerCase();
try
{
if (args.length > 0)
{
- page = Integer.parseInt(args[args.length - 1]);
+ page = Integer.parseInt(args[args.length - 1]);
if (args.length == 1)
{
- match = "";
+ match = "";
}
}
-
+
}
catch (Exception ex)
{
@@ -69,10 +69,10 @@ public class Commandhelp extends EssentialsCommand
private List<String> getHelpLines(User user, String match) throws Exception
{
List<String> retval = new ArrayList<String>();
- File helpFile = new File(ess.getDataFolder(), "help_"+Util.sanitizeFileName(user.getName()) +".txt");
+ File helpFile = new File(ess.getDataFolder(), "help_" + Util.sanitizeFileName(user.getName()) + ".txt");
if (!helpFile.exists())
{
- helpFile = new File(ess.getDataFolder(), "help_"+Util.sanitizeFileName(user.getGroup()) +".txt");
+ helpFile = new File(ess.getDataFolder(), "help_" + Util.sanitizeFileName(user.getGroup()) + ".txt");
}
if (!helpFile.exists())
{
@@ -81,8 +81,9 @@ public class Commandhelp extends EssentialsCommand
if (helpFile.exists())
{
final BufferedReader bufferedReader = new BufferedReader(new FileReader(helpFile));
- try {
-
+ try
+ {
+
while (bufferedReader.ready())
{
final String line = bufferedReader.readLine();
@@ -107,11 +108,11 @@ public class Commandhelp extends EssentialsCommand
for (Entry<String, HashMap<String, String>> k : cmds.entrySet())
{
if ((!match.equalsIgnoreCase("")) && (!p.getDescription().getName().toLowerCase().contains(match))
- && (!p.getDescription().getDescription().toLowerCase().contains(match)))
+ && (!p.getDescription().getDescription().toLowerCase().contains(match)))
{
continue;
}
-
+
if (p.getDescription().getName().toLowerCase().contains("essentials"))
{
final String node = "essentials." + k.getKey();