@@ -0,0 +1,2340 @@
+package net.silentchaos512.lib.util;%0A%0Aimport java.util.List;%0A%0Aimport com.google.common.collect.Lists;%0A%0Aimport net.minecraft.entity.item.EntityItem;%0Aimport net.minecraft.entity.player.EntityPlayer;%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraft.util.text.TextComponentString;%0A%0Apublic class PlayerHelper %7B%0A%0A  public static void addChatMessage(EntityPlayer player, String msg) %7B%0A%0A    player.addChatMessage(new TextComponentString(msg));%0A  %7D%0A%0A  public static void giveItem(EntityPlayer player, ItemStack stack) %7B%0A%0A    giveItem(player, stack, player.posX, player.posY + 1.0, player.posZ);%0A  %7D%0A%0A  public static void giveItem(EntityPlayer player, ItemStack stack, double posX, double posY,%0A      double posZ) %7B%0A%0A    EntityItem entityItem = new EntityItem(player.worldObj, posX, posY, posZ, stack);%0A    player.worldObj.spawnEntityInWorld(entityItem);%0A  %7D%0A%0A  public static void removeItem(EntityPlayer player, ItemStack stack) %7B%0A%0A    for (int i = 0; i %3C player.inventory.mainInventory.length; ++i) %7B%0A      if (stack == player.inventory.mainInventory%5Bi%5D) %7B%0A        player.inventory.mainInventory%5Bi%5D = null;%0A        return;%0A      %7D%0A    %7D%0A%0A    for (int i = 0; i %3C player.inventory.offHandInventory.length; ++i) %7B%0A      if (stack == player.inventory.offHandInventory%5Bi%5D) %7B%0A        player.inventory.offHandInventory%5Bi%5D = null;%0A        return;%0A      %7D%0A    %7D%0A%0A    for (int i = 0; i %3C player.inventory.armorInventory.length; ++i) %7B%0A      if (stack == player.inventory.armorInventory%5Bi%5D) %7B%0A        player.inventory.armorInventory%5Bi%5D = null;%0A        return;%0A      %7D%0A    %7D%0A  %7D%0A%0A  public static List%3CItemStack%3E getNonNullStacks(EntityPlayer player) %7B%0A%0A    return getNonNullStacks(player, true, true, true);%0A  %7D%0A%0A  public static List%3CItemStack%3E getNonNullStacks(EntityPlayer player, boolean includeMain,%0A      boolean includeOffHand, boolean includeArmor) %7B%0A%0A    List%3CItemStack%3E list = Lists.newArrayList();%0A%0A    if (includeMain)%0A      for (ItemStack stack : player.inventory.mainInventory)%0A        if (stack != null)%0A          list.add(stack);%0A%0A    if (includeOffHand)%0A      for (ItemStack stack : player.inventory.offHandInventory)%0A        if (stack != null)%0A          list.add(stack);%0A%0A    if (includeArmor)%0A      for (ItemStack stack : player.inventory.armorInventory)%0A        if (stack != null)%0A          list.add(stack);%0A%0A    return list;%0A  %7D%0A%7D%0A

Add PlayerHelper