#306 Adjust ExecutableCommand implementations to interface

This commit is contained in:
ljacqu
2015-12-23 14:55:04 +01:00
parent 8ef1b2ae3e
commit 14f6ecd716
37 changed files with 124 additions and 82 deletions
@@ -1,6 +1,7 @@
package fr.xephi.authme.command.executable.email;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.command.CommandService;
import fr.xephi.authme.command.ExecutableCommand;
import fr.xephi.authme.util.Wrapper;
import org.bukkit.command.CommandSender;
@@ -8,10 +9,10 @@ import org.bukkit.entity.Player;
import java.util.List;
public class AddEmailCommand extends ExecutableCommand {
public class AddEmailCommand implements ExecutableCommand {
@Override
public void executeCommand(CommandSender sender, List<String> arguments) {
public void executeCommand(CommandSender sender, List<String> arguments, CommandService commandService) {
// Make sure the current command executor is a player
if (!(sender instanceof Player)) {
return;
@@ -1,6 +1,7 @@
package fr.xephi.authme.command.executable.email;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.command.CommandService;
import fr.xephi.authme.command.ExecutableCommand;
import fr.xephi.authme.util.Wrapper;
import org.bukkit.command.CommandSender;
@@ -10,10 +11,10 @@ import java.util.List;
/**
*/
public class ChangeEmailCommand extends ExecutableCommand {
public class ChangeEmailCommand implements ExecutableCommand {
@Override
public void executeCommand(CommandSender sender, List<String> arguments) {
public void executeCommand(CommandSender sender, List<String> arguments, CommandService commandService) {
// Make sure the current command executor is a player
if (!(sender instanceof Player)) {
return;
@@ -4,6 +4,7 @@ import fr.xephi.authme.AuthMe;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.cache.auth.PlayerAuth;
import fr.xephi.authme.cache.auth.PlayerCache;
import fr.xephi.authme.command.CommandService;
import fr.xephi.authme.command.ExecutableCommand;
import fr.xephi.authme.output.MessageKey;
import fr.xephi.authme.output.Messages;
@@ -17,10 +18,10 @@ import org.bukkit.entity.Player;
import java.security.NoSuchAlgorithmException;
import java.util.List;
public class RecoverEmailCommand extends ExecutableCommand {
public class RecoverEmailCommand implements ExecutableCommand {
@Override
public void executeCommand(CommandSender sender, List<String> arguments) {
public void executeCommand(CommandSender sender, List<String> arguments, CommandService commandService) {
// Make sure the current command executor is a player
if (!(sender instanceof Player)) {
return;