Create builder for command description; refactor command classes

- Create builder class for CommandDescription
- Remove redundant methods in command registration classes (e.g. certain validation is superfluous because we only instantiate the classes internally)
- Replace multiple occurrences where a field is directly instantiated e.g. with a list and then its value is overwritten by a constructor = redundant instantiation of objects
This commit is contained in:
ljacqu
2015-11-28 23:59:04 +01:00
parent 364583e7db
commit faf9a2c8ac
6 changed files with 265 additions and 416 deletions
@@ -44,7 +44,7 @@ public class HelpPrinter {
sender.sendMessage(ChatColor.GOLD + "Short Description: " + ChatColor.WHITE + command.getDescription());
// Print the detailed description, if available
if (command.hasDetailedDescription()) {
if (!StringUtils.isEmpty(command.getDetailedDescription())) {
sender.sendMessage(ChatColor.GOLD + "Detailed Description:");
sender.sendMessage(ChatColor.WHITE + " " + command.getDetailedDescription());
}