#432 Injector improvements

- Separate FieldInjection from default fallback for no-Inject public no-args constructor classes
- Make CommandInitializer a normal, instantiable service
- Add various injections instead of fetching through command service
This commit is contained in:
ljacqu
2016-05-08 11:15:56 +02:00
parent 3e6223dc5a
commit 5e5836f167
50 changed files with 554 additions and 332 deletions
@@ -2,8 +2,10 @@ package fr.xephi.authme.command.executable.logout;
import fr.xephi.authme.command.CommandService;
import fr.xephi.authme.command.PlayerCommand;
import fr.xephi.authme.process.Management;
import org.bukkit.entity.Player;
import javax.inject.Inject;
import java.util.List;
/**
@@ -11,8 +13,11 @@ import java.util.List;
*/
public class LogoutCommand extends PlayerCommand {
@Inject
private Management management;
@Override
public void runCommand(Player player, List<String> arguments, CommandService commandService) {
commandService.getManagement().performLogout(player);
management.performLogout(player);
}
}