@SuppressWarnings("deprecation")
    public HashMap<UUID, com.yahoo.williamzhang890.transaction.Transaction> recievePackage(UUID uuid) {
        if (transactions.containsKey(uuid)) {
            if (transactions.get(uuid).getStatus()) {
                String msg = "";
                int size = transactions.get(uuid).getPackages().getItems().size();
                for (int i = 0; i < size; i++) {
                    ArrayList<ItemStack> items = transactions.get(uuid).getPackages().getItems().get(i).getItems();
                    for (int a = 0; a < items.size(); a++) {
                        ItemStack item = items.get(a);
                        if (item != null) {
                            p.getInventory().addItem(item.clone());
                            p.getInventory().setContents(p.getInventory().getContents());
                            p.updateInventory();
                            if ((a | i) != 0) {
                                msg += ",";
                            }
                            if (i == size - 1 && a == items.size() - 1) {
                                msg += String.format(" and x%s %s", item.getAmount(), item.getType().name().toLowerCase());
                            } else {
                                msg += String.format(" x%s %s", item.getAmount(), item.getType().name().toLowerCase());
                            }
                        }
                    }
                }
                Transaction t = transactions.get(uuid);
                t.setStatus(false);
                p.sendMessage(Mechanics.formatMessage(ChatColor.GREEN + MessageFormat.format(ChestDelivery.languageReader.getString("packageMessages.recievePackageMessage"),
                        msg, ChestDelivery.instance.getServer().getOfflinePlayer(transactions.get(uuid).getSender()).getName(), t.getTime())));
                transactions.put(uuid, t);
            } else {
                p.sendMessage(Mechanics.formatMessage(ChatColor.RED + ChestDelivery.languageReader.getString("errorMessages.noItemError")));
            }
        } else {
            p.sendMessage(Mechanics.formatMessage(ChatColor.RED + ChestDelivery.languageReader.getString("errorMessages.noItemError")));
        }
        p.getWorld().playSound(p.getLocation(), Sound.ORB_PICKUP, 1, 1);
        return transactions;
    }