@Override
	public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
		Player source = null;
		Player target = null;
		Location targetLocation = null;
		
		if (args.length == 0) {
			return false;
		}
		
		//check for source player name
		source = getPlayer(args[0]);
		if (source != null){
			if (args.length == 1) {
				target = source;
				source = null;
			}
			args = Arrays.copyOfRange(args, 1, args.length);
		}
		
		
		if (source == null) {
			// first arg isn't player, maybe you mean yourself
			if (!(sender instanceof Player)) {
				sender.sendMessage("You are not a player and cannot be teleported.");
				return false;
			}
			source = (Player)sender;
		}
		assert (source != null);
		
		if (args.length == 1) {
			// target should be a player
			target = getPlayer(args[0]);
			if (target == null) {
				source.sendMessage(String.format("Cannot find target player '%s'.", args[0]));
				return false;
			}
		}
		
		if (target != null) {
			return warp(source, target);
		}
		
		//target must be a location at this point
		targetLocation = getLocation(source, args);
		
		if (targetLocation == null) {
			source.sendMessage(String.format("Cannot find target location '%s'.", Arrays.toString(args)));
			return false;
		}
		
		return warp(source, targetLocation);
	}