public List<ItemStack> doSaveCheck(Player player,
			List<ItemStack> itemsToCheck) {

		String playerName = player.getName();
		List<ItemStack> drops = itemsToCheck;

		// Initialise a new array that will hold all items that will be forced to drop (I.E. Blacklisted)
		List<ItemStack> blacklisted = new ArrayList<ItemStack>();

		// Initialise a new array that will hold all items that will be forced to keep (I.E. Whitelisted)
		List<ItemStack> whitelisted = new ArrayList<ItemStack>();

		// Group of the player
		String group = plugin.getFiles().getGroup(player);

		// Remove the blacklisted items from inventory so they are not counted
		for (ItemStack item : player.getInventory()) {
			if (group != null && item != null) {
				if (plugin.getListHandler().isBlacklistedItem(item, group)) {
					blacklisted.add(item);
					// We don't want to keep an item that is forced to be dropped.
					drops.remove(item);
					continue;
				} else if (plugin.getListHandler().isWhitelistedItem(item,
						group)) {
					whitelisted.add(item);

					// We don't want the same item given more than once, so we remove it from the drops
					drops.remove(item);
					continue;
				}
			}
		}

		// Make the whitelisted items global so returnItems() can add them to the inventory
		whitelistedItems.put(playerName, whitelisted);

		// Calculate amount of items not being dropped
		double calculated;

		calculated = drops.size()
				* (plugin.getFiles().getRetainPercentage(player) / 100d);

		// Initialize new ItemStack array
		List<ItemStack> itemstackarray = new ArrayList<ItemStack>();

		// Clear slots used
		randomUsed.put(playerName, new ArrayList<Integer>());

		// Keep a list of items that are kept and should be removed from the drops
		List<ItemStack> keptItems = new ArrayList<ItemStack>();

		// Create for loop to loop all not drops
		for (int i = 0; i < Math.round(calculated); i++) {
			// Create a random number
			int slot = generateRandomUnique(drops.size(), playerName);

			itemstackarray.add(drops.get(slot));
			keptItems.add(drops.get(slot));
		}

		// Clear slots used
		randomUsed.put(playerName, new ArrayList<Integer>());

		// Remove all kept items from the drops
		// Can't remove drops.removeAll() because that would delete everything when there is only 1 item.
		for (ItemStack keptItem : keptItems) {
			for (ItemStack drop : drops) {
				if (drop.isSimilar(keptItem)) {
					drops.remove(drop);
					break;
				}
			}
		}

		// Drop all blacklisted items (They are forced to drop)
		drops.addAll(blacklisted);

		// Items that are kept
		return itemstackarray;
	}