Change ExecutableCommand interface (wip – doesn't compile)

- Change interface to use (CommandSender, List<String> arguments)
- Use CommandArgumentDescription#name instead of "label" (to prevent confusion between command labels and arguments)
- Simplify command difference computation in CommandHandler (no longer consider argument difference)
This commit is contained in:
ljacqu
2015-12-12 11:39:19 +01:00
parent 2f153fb85c
commit eecad80748
39 changed files with 249 additions and 517 deletions
@@ -1,21 +1,22 @@
package fr.xephi.authme.command.executable.logout;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.command.CommandParts;
import fr.xephi.authme.command.ExecutableCommand;
import fr.xephi.authme.util.Wrapper;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.List;
/**
*/
public class LogoutCommand extends ExecutableCommand {
@Override
public boolean executeCommand(CommandSender sender, CommandParts commandReference, CommandParts commandArguments) {
public void executeCommand(CommandSender sender, List<String> arguments) {
// Make sure the current command executor is a player
if (!(sender instanceof Player)) {
return true;
return;
}
// Get the player instance
@@ -24,6 +25,5 @@ public class LogoutCommand extends ExecutableCommand {
// Logout the player
plugin.getManagement().performLogout(player);
return true;
}
}