A simple change like this should be enough: if (p.getName().toLowerCase().startsWith(partialPlayerName) && !p.hasPermission("bungeetabcomplete.hide"))