Код: int j = 0; for(Player player : GameObjectsStorage.getPlayers()) { if(player.isInOfflineMode()) { j++; } }