public Inventory getInventoryView(String name)
{
Player player = this.getPlayer();
if (player == null) return null;
PlayerInventory pInventory = player.getInventory();
String inventoryName = name.length() > 32 ? name.substring(0, 32) : name;
Inventory inventoryView = Bukkit.getServer().createInventory(null,
pInventory.getSize() + 9, inventoryName);
ItemStack[] oldContents = pInventory.getContents();
ItemStack[] newContents = inventoryView.getContents();
newContents[oldContents.length + SLOT_HELMET] = copyItem(pInventory.getHelmet());
newContents[oldContents.length + SLOT_CHEST] = copyItem(pInventory.getChestplate());
newContents[oldContents.length + SLOT_LEGS] = copyItem(pInventory.getLeggings());
newContents[oldContents.length + SLOT_FEET] = copyItem(pInventory.getBoots());
// SLOT 6: ACTIVE POTION EFFECTS
if (player.getActivePotionEffects().size() > 0)
{
ItemStack potion = new Potion(PotionType.POISON).toItemStack(1);