Added a check to make sure the player is online before switching inventories
Update for Bukkit 1.6.2