#1008 Check that OfflinePlayer's name is not null

- Add check
- Create test
This commit is contained in:
ljacqu
2016-11-19 17:36:05 +01:00
parent 30343d7587
commit dda7bd5cb5
2 changed files with 22 additions and 1 deletions
@@ -72,7 +72,7 @@ class PurgeTask extends BukkitRunnable {
}
OfflinePlayer offlinePlayer = offlinePlayers[nextPosition];
if (toPurge.remove(offlinePlayer.getName().toLowerCase())) {
if (offlinePlayer.getName() != null && toPurge.remove(offlinePlayer.getName().toLowerCase())) {
if (!permissionsManager.hasPermissionOffline(offlinePlayer, PlayerStatePermission.BYPASS_PURGE)) {
playerPortion.add(offlinePlayer);
namePortion.add(offlinePlayer.getName());