changed commandSender to player entity as its described in the coreApi