Some minor improvements from static analysis

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2017-11-07 17:28:28 +11:00
parent 2a82e16c61
commit 417599c2ab
15 changed files with 44 additions and 56 deletions

View File

@@ -5,8 +5,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.apache.commons.lang.StringUtils;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.help.HelpTopic;
/**
* Lacking an alternative, the help system will create instances of
@@ -28,7 +26,7 @@ public class GenericCommandHelpTopic extends HelpTopic {
}
// The short text is the first line of the description
int i = command.getDescription().indexOf("\n");
int i = command.getDescription().indexOf('\n');
if (i > 1) {
shortText = command.getDescription().substring(0, i - 1);
} else {
@@ -36,7 +34,7 @@ public class GenericCommandHelpTopic extends HelpTopic {
}
// Build full text
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
sb.append(ChatColor.GOLD);
sb.append("Description: ");