Replace getName with hasPlayedBefore as offlineplayer will never be null. This fixes quite a few command bugs.