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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user