#306 Add command service and set up constructor dependency injection
(work in progress) - Pass all dependencies via constructor - Encapsulate command handling more (e.g. split CommandHandler with new CommandMapper) - Add help command to all base commands at one central point See AccountsCommand or HelpCommand for an example of the advantages - all necessary functions come from CommandService; objects aren't retrieved through a singleton getInstance() method anymore
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package fr.xephi.authme.command.executable.email;
|
||||
|
||||
import fr.xephi.authme.command.CommandService;
|
||||
import fr.xephi.authme.command.ExecutableCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Base command for /email, showing information about the child commands.
|
||||
*/
|
||||
public class EmailBaseCommand implements ExecutableCommand {
|
||||
|
||||
@Override
|
||||
public void executeCommand(CommandSender sender, List<String> arguments, CommandService commandService) {
|
||||
// FIXME #306 use getCommandService().getHelpProvider();
|
||||
// FIXME #306 HelpProvider.printHelp()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user