public static Reagent getPlayerReagentType(EntityPlayer player) {
    NBTTagCompound data = APISpellHelper.getPersistentDataTag(player);
    if (data.hasKey("BM:ReagentType")) {
      return ReagentRegistry.getReagentForKey(data.getString("BM:ReagentType"));
    }

    return null;
  }
 public static void setPlayerReagentType(EntityPlayer player, Reagent reagent) {
   setPlayerReagentType(player, ReagentRegistry.getKeyForReagent(reagent));
 }