Changed Items to use getType method of IPlayer to determine their type and safely cast.